*From*: jonathan@xxxxxxxxxxxxxxxxxx*To*: oracle-l@xxxxxxxxxxxxx*Date*: Thu, 25 Jan 2007 10:58:51 +0000

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

**Follow-Ups**:**RE: Density calculation. Was: Incorrect cardinality estimate***From:*Laimutis Nedzinskas

- » Density calculation. Was: Incorrect cardinality estimate
- » Re: Density calculation. Was: Incorrect cardinality estimate
- » RE: Density calculation. Was: Incorrect cardinality estimate
- » RE: Density calculation. Was: Incorrect cardinality estimate
- » RE: Density calculation. Was: Incorrect cardinality estimate