What is the
num_buckets and
density in the following script?
I search the Oracle Doscs and find the descriptions, but I don't think it states clearly. Could you clarify it for me?
DENSITY : NUMBER Density of the column
NUM_BUCKETS : NUMBER Number of buckets in histogram for the column
SQL> SELECT column_name, num_distinct, num_buckets, density, histogram
2 FROM USER_TAB_COL_STATISTICS
3 WHERE table_name = 'JOBS' AND COLUMN_NAME='MAX_SALARY';
COLUMN_NAME NUM_DISTINCT NUM_BUCKETS DENSITY HISTOGRAM
------------------------------ ------------ ----------- ---------- -----------
MAX_SALARY 13 1 .076923077 NONE