Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> ** histograms

** histograms

From: <oracle-l-bounce_at_freelists.org>
Date: Mon, 20 Nov 2006 18:35:45 -0000
Message-ID: <5A8896FB2AFC5445A7DCFC5903CCA6B06FEB82@W03856.li01r1d.lais.net>


-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Wolfgang Breitling
>>
>>Is it advisable to use histograms just for some tables and some
>>specific columns or is it OK to just set database wide?
>No.
>At least in my opinion. I have seen an unnecessary histogram - on a
column with perfectly uniform data distribution - destroy ( and I mean destroy, by a factor of ~ 9000 ) the performance of a sql statement. See also the recent post by Fuad Arshad and I quote: "it is generating histograms which doesnt work well with the application".

It would be interesting to set conditions under which the statement "more statistics mean a better plan" is true. I would start with this:

-Columns data distribution is even
-Columns correlation is zero
-Clustering is zero meaning all rows perfectly mixed.

Then provided a) all permutations are scanned and b) floating point calculations are used this may be true.

Now if we start relaxing the conditions:

Then I think all depends on bind variables. If all sql is literal then I think the statement is still true. If not then it is a matter of luck I think.  

Fyrirvari/Disclaimer
http://www.landsbanki.is/disclaimer

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Nov 20 2006 - 12:35:45 CST

Original text of this message

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