DB2 10.5 for Linux, UNIX, and Windows

SYSSTAT.COLDIST catalog view

Each row represents the nth most frequent value of some column, or the nth quantile (cumulative distribution) value of the column. Applies to columns of real tables only (not views). No statistics are recorded for inherited columns of typed tables.

Table 1. SYSSTAT.COLDIST Catalog View
Column Name Data Type Nullable Updatable Description
TABSCHEMA VARCHAR (128)     Schema name of the table to which the statistics apply.
TABNAME VARCHAR (128)     Unqualified name of the table to which the statistics apply.
COLNAME VARCHAR (128)     Name of the column to which the statistics apply.
TYPE CHAR (1)    
  • F = Frequency value
  • Q = Quantile value
SEQNO SMALLINT     If TYPE = 'F', n in this column identifies the nth most frequent value. If TYPE = 'Q', n in this column identifies the nth quantile value.
COLVALUE1 VARCHAR (254) Y Y Data value as a character literal or a null value.
VALCOUNT BIGINT   Y If TYPE = 'F', VALCOUNT is the number of occurrences of COLVALUE in the column. If TYPE = 'Q', VALCOUNT is the number of rows whose value is less than or equal to COLVALUE.
DISTCOUNT2 BIGINT Y Y If TYPE = 'Q', this column records the number of distinct values that are less than or equal to COLVALUE (the null value if unavailable).
Note:
  1. In the catalog view, the value of COLVALUE is always shown in the database code page and can contain substitution characters. However, the statistics are gathered internally in the code page of the column's table, and will therefore use actual column values when applied during query optimization.
  2. DISTCOUNT is collected only for columns that are the first key column in an index.