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: Optimizer

Re: Optimizer

From: Niall Litchfield <niall.litchfield_at_gmail.com>
Date: Thu, 30 Sep 2004 23:27:53 +0100
Message-ID: <7765c897040930152736a6cbc4@mail.gmail.com>


On Thu, 30 Sep 2004 16:47:39 -0500, Freeman Robert - IL <freemanr_at_tusc.com> wrote:
> Sitting here thinking about it, I think my point is this....
>
> Does it matter what it is really doing? The question is, whatever it's
> doing, why is it not doing the best doing it can be doing UNLESS I give it a
> hint that causes it to do something different?

One thing that I haven't seen mentioned yet is that you seem to have an 'edge' case for some reason. Your preferred plan has a cost of 40 as does the plan the optimizer chooses. So how does the optimizer choose between them? The simple answer is I don't know - though I'd hope 10053 might give a clue. My *guess* would be that the CBO doesn't pick the second plan because the cost is no better than the first and the order that it evaluates them in puts the second plan second. My belief is that this is how the CBO *always* works i.e. it calculates plans and rejects those that aren't lower cost than the least cost it has already discovered. Others will likely know better. In any case I guess the question might better rephrased as why does the plan that requires 17% more io get costed the same. A number of possibilities suggest themselves that only a 10053 would answer.

-- 
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Sep 30 2004 - 17:23:33 CDT

Original text of this message

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