Re: Density calculation. Was: Incorrect cardinality estimate

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


Other related posts: