Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQL Joins Optimization
Given the followin SQL statement:
Select * from table1,table2
where table1.field1(pk) = table2.field1(fk)
and table1.field2 = 'test'
How an I get oracle to only search the
joined resultset where field2 = 'test'.
Meaning if table1 has 1000000 records and the joined resultset returns only 100 records I don't want the optimizer to query the text search ('test') on 1 million record but only on the joined resultset of 100 records.
It seems to be always querying the 1 million record resultset before the join.
Hope this makes sense.
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Nov 27 2000 - 14:54:40 CST