Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQL Joins Optimization

SQL Joins Optimization

From: <geenstones_at_my-deja.com>
Date: Mon, 27 Nov 2000 20:54:40 GMT
Message-ID: <8vuhmg$ooe$1@nnrp2.deja.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US