Database Reference
In-Depth Information
Figure 8-4. Graphical representation of a height-balanced histogram based on the set of data stored in the val2 column
For the case of Figure 8-4 , the following query shows the height-balanced histogram stored in the data dictionary.
Interestingly enough, not all buckets are stored. This doesn't happen because several adjacent buckets with the same
endpoint value are of no use. In fact, from this data it's possible to infer that bucket 2 has an endpoint value of 105 and
bucket 4 has an endpoint value of 106. The result is a kind of compression. The values appearing several times in the
histogram are called popular values and are especially handled by the query optimizer:
SQL> SELECT endpoint_value, endpoint_number
2 FROM user_tab_histograms
3 WHERE table_name = 'T'
4 AND column_name = 'VAL2'
5 ORDER BY endpoint_number;
ENDPOINT_VALUE ENDPOINT_NUMBER
-------------- ---------------
101 0
104 1
105 3
106 5
 
Search WWH ::




Custom Search