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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Outer joins = full scan?

Re: Outer joins = full scan?

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Fri, 30 May 2003 14:40:58 +0000
Message-ID: <bb7jk0$os6$1@ctb-nnrp2.saix.net>


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.

--
Billy
Received on Fri May 30 2003 - 09:40:58 CDT

Original text of this message

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