Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Outer joins = full scan?
Ed Prochak wrote:
> Why do you want to use an index on the outer join query??
>
> Think about what an OUTER JOIN is requesting the DB to do: return ALL rows
> of the base table (T), matched or not with the rows of the outer table
> (C).
>
> What is the fastest way to get all the rows of the table?
>
> A) access the index and then access the table
> B) access just the table
>
> Answer B is faster for accessing all rows of the table.
True, but not in this case Ed.
He uses criteria in his statement on table T (table 1 in the outer join). Thus is it not requested all rows from table T.
I.e.
> AND t.location_code = 'value'
> AND t.case_num = 'value';
This could be faster using an index than a full table scan.
-- BillyReceived on Fri May 30 2003 - 09:40:58 CDT
![]() |
![]() |