Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Number of Buckets in Histogram?
Hi,
Is there any kind of formulaeic way to appropriately select the number of buckets for a histogram in an ANALYZE statement?
The oracle manual does not provide any insight into this, simply saying to experiment with different values (also stating that a size of 75 is recommended for most data distributions...and I have no idea what that is supposed to mean).
I have a table of 1 million rows and one column in that table has 6 distinct values, skewed. Does this mean I should create a 6 bucket histogram on this column? Is there a relationship between cardinality of the column and the appropriate histogram value?
What about a different column in this table that has 300 distinct values which are skewed. The maximum number of buckets on a histogram is 254. What do I do?
I would love to know if anyone has a mathematical formula or logical algorithm which I can use to determine how many buckets to include in analyze statements.
Thanks,
Gavin