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: Why does Optimizer relys on COST to produce the execution plan?

RE: Why does Optimizer relys on COST to produce the execution plan?

From: Christian Antognini <Christian.Antognini_at_trivadis.com>
Date: 2006-01-02 11:23:00
Message-id: F2C9CCA71510B442AF71446CAE8AEBAF205682@MSXVS04.trivadis.com


Jaffar

>I have not enabled the system level statistics.

Then it's your fault ;-)

>I question is that, there is nothing related with cost value, then, why
>does oracle heavly rely on this value to produce the 'best execution plan'?

The model cannot rely on runtime statistics because the query has not run yet. This seam \ obvious. Therefore the model can only estimate the work that has to be done to execute the \ query.

Historically the cost is based on:
- the number of I/O performed to execute an execution plan - some INIT.ORA parameters

If you give a look to the figures of your query, the cost of the index scan and the LIO \ performed to execute it are quite close. The problem, probably, is that the FTS are too \ highly cost. (db_file_multiblock_read_count too large?)

>I dont know whether the behaviour might change once we get the system
>level stats.

With system statistics the model changes, therefore the behavior may change as well. In \ your case, I guess, the FTS will be more expensive.

>By the way, how do we count the value coming from v$sysstat for CPU
>used by this session'? How do I calculate this value? Is this CPU
>cycles or what?

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/apc2.htm

HTH
Chris

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jan 02 2006 - 11:23:00 CST

Original text of this message

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