Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A histogram is a structure with buckets which contain bitmap references to rows. Each bucket represents a particular column value and the bitmap references all rows with that value. When a SQL predicate references the column, the histogram can be consulted to determine which rows include that specific value. There are different types of histograms created and used by the Optimizer.
Frequency histograms have a bucket for each distinct value. For example, if 20 employees have a salary of $30,000, then a frequency histogram for the SALARY column would represent the value $30,000 with one bucket. Whenever the number of distinct values are less than or equal to the number of buckets, then a frequency histogram is used.