Re: Optimizer

  • From: Niall Litchfield <niall.litchfield@xxxxxxxxx>
  • To: freemanr@xxxxxxxx
  • Date: Thu, 30 Sep 2004 23:27:53 +0100

On Thu, 30 Sep 2004 16:47:39 -0500, Freeman Robert - IL
<freemanr@xxxxxxxx> 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
--
//www.freelists.org/webpage/oracle-l

Other related posts: