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: 54 is less than 4 for CBO ?

RE: 54 is less than 4 for CBO ?

From: Christian Antognini <Christian.Antognini_at_trivadis.com>
Date: Mon, 22 May 2006 12:58:34 +0200
Message-ID: <F2C9CCA71510B442AF71446CAE8AEBAF3F5CBE@MSXVS04.trivadis.com>


Milen

>But how is is possible to ignore the fact that cost = 54 (index acces) is
>less than cost = 4 ?
>Or there are some peculiarities hard-coded in the logic of CBO that are
>roughly saying : "If you have FIRST_ROWS as hint or optimizer_mode then use
>the index at (almost) any cost".

The old first row optimizer (that you activated with the hint FIRST_ROWS) works in this way. Therefore I usually say it isn't a true cost-based optimizer. Is more or less a hybrid between rule-based and cost-based.

If you want a better first row optimizer you should use the new one (which is available as of 9.0). It can be activated with FIRST_ROWS_n, where n is the number of rows for which the query optimizer will compute the costs. With it you will get full table scans as well if they make sense from a costing point of view...

HTH
Chris

--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 22 2006 - 05:58:34 CDT

Original text of this message

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