Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Creating Histograms

Re: Creating Histograms

From: Jonathan Lewis <>
Date: Fri, 23 Jul 2004 17:50:29 +0100
Message-ID: <01a201c470d5$2b55e150$7102a8c0@Primary>

Note in-line


Jonathan Lewis The Co-operative Oracle Users' FAQ Optimising Oracle Seminar - schedule updated July 20th

>> Jonathan, would you agree that it's fair to say that, "Cost is irrelevant
>> for virtually every purpose other than comparing it with other costs?"

    No. Actually I tend to use the cost to identify

  1. problems with statistics
  2. deficiences in the CBO
  3. bugs in CBO in that order.

Apart from that, I tend to assume that "cost = predicted run time", with a fudge factor thrown in for known deficiencies in the CBO. (I used to say cost = csecs to completion as a rough guide, but that's just an approximation to the now-published statement that the cost is the completion time measured in units of the single-block read-time)

In fact, when cost != run-time, that's my first clue to the presence of a CBO problem.

>> I know that it may be possible to find some factor f for which (response
>> time) = f * cost, but I think you and Tom would both say that cost is
>> predominantly of value as a measure that allows CBO to RANK the expected
>> performance of competing query execution plans. Yes?

No. The most significant difference of opinion that we have (or perhaps had) was that Tom used to state quite firmly that you could not compare the cost of one query with the cost of a different query and assume that the comparison had any meaning. I believe that two costs reported at the same time from the same system mean the same thing - even if they come from the execution paths from two different queries.

Please see the official ORACLE-L FAQ:

To unsubscribe send email to: put 'unsubscribe' in the subject line.
Archives are at
FAQ is at
Received on Fri Jul 23 2004 - 11:47:09 CDT

Original text of this message