Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

replacing multiple not exists with join

865947Jun 1 2011 — edited Jun 6 2011
Hi
I need to replace multiple not exists (see below) with join to get better performace (hopefully) but not able to figure out..........any help ???

select * from Table1 where exists (select 'x' from Table2 where Table1.COL1 = Table2.COL1
and TEST1 = '1' and exists (select 'x' from Table3 where Table2.ID = Table3.ID
and TEST2 = '1'))

and not exists (select 'x' from Table4
where Table1.COL2 = Table4.COL2 and Test3='A')

and not exists (select 'x' from Table5
where Table1.COL2 = Table5.COL2 and Test4='B')


-- here Table1, Table2.... are alias used for actual tables.

Thanks in advance......

Edited by: 862944 on Jun 1, 2011 9:50 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 4 2011
Added on Jun 1 2011
10 comments
1,985 views