I need to improve the performance of this query:
Select
t1.column1, t1.column2
From
table1 t1, table2 t2
Where
t1.id = t2.id and
t1.some_column = t2.some_column
--------
minus
--------
Select
t1.column1, t1.column2
From
table1 t1, table2 t2, table3 t3
Where
t1.id = t2.id and
t1.some_column = t2.some_column and
t1.id = t3.id
I’m trying to rewrite this query using “not exists” instead of “minus”. Can someone give me an advice?
how about this?