RE: Which plan is better - what COST really means ?

  • From: "Cary Millsap" <cary.millsap@xxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 13 Jan 2005 08:25:03 -0600

People seem to cloud the concepts of the pre-run estimated runtime of a
query (officially its "estimated cost") and the post-run operationally
measured runtime of a query. The problem with a CBO is that before a =
runs, it can only estimate a cost using a model. The model is not =
(although it's usually more perfect than the input--db and schema
statistics--than DBAs feed the model).

Now, AFTER a query runs, it's easy to see whether the estimated cost was =
good or not. But who wants the CBO to run a query six ways before =
choosing a

If I recall correctly, 10g has some operational memory built into the =
that allows the CBO to use operationally measured response times for a =
query as an input into computing the next plan.

Mr. Sharman, care to comment? (And by the way, will I be seeing you in =
next week?)

Cary Millsap
Hotsos Enterprises, Ltd.
* Nullius in verba *

Upcoming events:
- Performance Diagnosis 101: 2/23 Houston, 3/16 Salt Lake City
- SQL Optimization 101: 2/7 Dallas
- Hotsos Symposium 2005: March 6-10 Dallas
- Visit for schedule details...

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx =
On Behalf Of Jaffar_DBA
Sent: Thursday, January 13, 2005 3:01 AM
To: premj@xxxxxxxxxxxxxx
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: Which plan is better - what COST really means ?

I definately agree with about what toms is saying. I had expereince
where higher COST queries much father than lower COST queries in the
CBO. Taking consideration of response time would be more better than
COST of the query.

On 13 Jan 2005 08:57:11 -0000, Prem Khanna J <premj@xxxxxxxxxxxxxx> =
> Friends,
> when i have got two plans , how do i decide
> which one is the best ?
> just read in asktom , that COST of a plan ,
> does not have any correspondence with response
> time of a query.
> i.e.,a query with higher COST than another
> can be faster.
> if so , what in the execution plan does help
> me to decide about a good (faster) plan ?
> unless i execute it , can't i know it ?
> is that the only way !!!
> Can someone throw light on this ?
> The environment is oracle
> Thanks in advance.
> Regards,
> Prem.
> --
> //

Best Regards,
Jaffar, OCP DBA
Banque Saudi Fransi
Saudi Arabia


Other related posts: