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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: [Q] does outer join cause full table scan?

RE: [Q] does outer join cause full table scan?

From: Bobak, Mark <Mark.Bobak_at_il.proquest.com>
Date: Tue, 30 Mar 2004 13:47:39 -0500
Message-ID: <4C9B6FDA0B06FE4DAF5918BBF0AD82CFECFC6A@bosmail00.bos.il.pqe>


Um, no, outer join does not necessitate a full table scan. You mention having indexes on your join columns. That's (probably) a good thing, but, if you have something like:

select a.*, b.* from a, b
where a.join_id = b.join_id(+);

then, at a minimum, Oracle MUST FTS the driving table. That's because there are no filter predicates. If the statement looked something like:

select a.*, b.* from a, b
where a.join_id = b.join_id(+)
and a.filter_column = 'some value';

AND if there is an index on a.filter_column, then Oracle MAY choose to drive from table a, use that index, and join the filtered rowsource to table b using the index on b.join_id.

Also, keep in mind, with CBO, Oracle decides whether it's reasonable to use any given index. The above was just to illustrate that it's possible to do an outer join and avoid FTS.

-Mark

-----Original Message-----

From: dba1 mcc [mailto:mccdba1_at_yahoo.com] Sent: Tuesday, March 30, 2004 1:29 PM
To: oracle-l_at_freelists.org
Subject: [Q] does outer join cause full table scan?

We have sql statement outer join two tables. The join columns have index on it. I use "tkprof" to check it and it show full table scan.

Does outer join cause 'full table scan"?

Thanks.



Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html

Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html

-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Tue Mar 30 2004 - 12:45:01 CST

Original text of this message

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