| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Newbie: Index Usage
I have a select statement as follows:
select stuff
from table1, table2
where table1.x1 in (value1, value2) and
table2.x2 (+) = table1.x2 and
table2.x3 (+) = table1.x3;
table1.x1 is indexed not primary. The query is doing a full table scan on table 1. If the outer joins are not present the index is used. Also if the in is not present and = value1 is used,and the outer joins are present it uses the index so a union works. Can anyone explain to me why this happens.
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Nov 11 1999 - 15:21:12 CST
![]() |
![]() |