Sample output for histograms

Histogram for column:              "city"
Column datatype:                    varchar(20)
Requested step count:               20
Actual step count:                  20
Sampling percent:                   0
Out of range histogram adjustment:   DEFAULT

optdiag first prints summary data about the histogram, as shown in Table 2-6.

Table 2-6: Histogram summary statistics

Row label

Information provided

Histogram for column

Name of the column.

Column datatype

Datatype of the column, including the length, precision and scale, if appropriate for the datatype.

Requested step count

Number of steps requested for the column.

Actual step count

Number of steps generated for the column.

This number can be fewer than the requested number of steps if the number of distinct values in the column is smaller than the requested number of steps.

Sampling percent

Percentage of table data sampled to produce the histogram. Value range is from 0 – 100.

Out of range histogram adjustment

Indicates whether the column’s histogram is to be adjusted to assign a selectivity value for out-of-bounds search arguments on the column. Value is one of on, off, or default. This row appears along with histogram information only for global column statistics, not at the partition level.

Histogram output is printed in columns, as described in Table 2-7.

Table 2-7: Columns in optdiag histogram output

Column

Information provided

Step

Number of the step.

Weight

Weight of the step.

(Operator)

<, <=, or =, indicating the limit of the value. Operators depend on whether the cell represents a range cell or a frequency call. No heading prints for this column.

Value

Upper boundary of the values represented by a range cell, or the value represented by a frequency count.