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: Creating Histograms

Re: Creating Histograms

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

Note in-line

Regards

Jonathan Lewis

http://www.jlcomp.demon.co.uk/faq/ind_faq.html The Co-operative Oracle Users' FAQ

http://www.jlcomp.demon.co.uk/seminar.html 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: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Fri Jul 23 2004 - 11:47:09 CDT

Original text of this message

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