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

Home -> Community -> Usenet -> comp.databases.theory -> Re: union all vs. left outer join

Re: union all vs. left outer join

From: VC <boston103_at_hotmail.com>
Date: Thu, 10 Nov 2005 18:03:14 -0500
Message-ID: <X8ydnfMFtY4zTO7eRVn-jw@comcast.com>

<henrik.sorensen_at_balcab.ch> wrote in message news:dl0iim$vi6$1_at_news.hispeed.ch...
[...]
>
> But thanks again for sharing your insight. I am a bit surprised that the
> indexes are not used as I expected, but then again, I learned something.
>
> Henrik
>
>

If you access a set of rows via an index, you need two logical IOs per each access, one to read an index entry and another to read the row the index entry points to, while with a full scan you read table rows directly using efficient multiblock reads. So it's a matter of deciding what is cheaper in terms of CPU and IO, and the optimizer does just that. The table access algorithms are more complicated of course but that's the general idea. Received on Thu Nov 10 2005 - 17:03:14 CST

Original text of this message

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