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: <ryan.gaffuri_at_comcast.net>
Date: Wed, 21 Jul 2004 19:25:14 +0000
Message-Id: <072120041925.1504.40FEC319000D376E000005E02200735446079D9A00000E09D2020E979D@comcast.net>


Cost is irrelavent. Ignore it. Its strictly internal to Oracle. You cannot compare costs of two different plans. This is all over asktom. The primary stats to look at are:(though other stats have uses).

consistent gets (logical IO) -- 99.99% of the time the query with the lower value is better. Every once in a while I found that a 30% increase in logical IOs when doing a faster full scan results in a 30% or more reduction in response times. This is on large batch processes only and do not have to stand up under concurrency. I do not have a repeatable case and no idea why... Cardinality/Rows -- this one is more important in OLTPs, since you want to primary reduce 'rows' at each operation of your query. The earlier in the plan you can weed out unnecessary rows, the better the performance. Bytes -- this is typically more useful with full table scans, hash joins, and sort merges, since you are reading all the bytes in the block. Methodology with this one is the same as Cardinality/Rows. You will use this when doing batch processes and reporting. Less often with OLTPs.

>
> My point was only that "choosing" lowest cost plan of a given statement is
> not necessarily indicative of the "best" plan.
> --
> .
> David
>
> > Hi David, then how do you get cbo uses the histogram and do a full scan,
> > when this is more than 90% of the data
> > changing the optimizer index parameter?
>
> ----------------------------------------------------------------
> 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
> -----------------------------------------------------------------
> ----------------------------------------------------------------
> 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
> -----------------------------------------------------------------



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 Wed Jul 21 2004 - 14:21:51 CDT

Original text of this message

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