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: Density calculation. Was: Incorrect cardinality estimate

Re: Density calculation. Was: Incorrect cardinality estimate

From: <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 25 Jan 2007 10:58:51 +0000
Message-Id: <E1HA2Jf-000DcP-8r@pr-webmail-2.demon.net>

See Cost Based Oracle Fundamentals p.172

In purely descriptive terms, the density is:

    sum of the square of the frequency of the non-popular values /     (number of non-null rows * number of non-popular non-null rows)

It is interesting to note that in the case of the original poster, eliminating the popular values made the density go UP, when you would expect it to go down.

Regards
Jonathan Lewis

> It seems if Oracle is doing a natural thing when calculating density.
> If histogram is provided then Oracle tries to remove "noise" from
> density calculation.
> A small test reveals that Oracle is able to effectively remove very
> popular values.
> The formula is (kind of) following:
>
> Density=Cardinality_for_Unpopular_Values/Number_of_Rows
>

Regards
Jonathan Lewis

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 25 2007 - 04:58:51 CST

Original text of this message

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