Push the filter condition after the join.
820957Dec 10 2011 — edited Dec 15 2011Hi All,
I have a simple question on joining two tables it would be really great if you can help me to understand the concept here.
I have two tables
T1--> 100 rows
T2--> 1,000,000 rows
I have a filter on T1 so it will return only 10 rows
SELECT COUNT (*)
FROM T1, T2
WHERE T1.ID = T2.ID
AND T1.NAME = 'JOHN'
AND T2.CITY = 'AAAA'
As per my understanding oracle will apply the filters on t1 and t2 and then join the tables.
Is there any way i can apply the filter on t1 join it with t2 and apply the second filter on the result set?
Thanks in advance!!!
Edited by: Shadowcat on Dec 10, 2011 8:27 AM