INDEXPREFIXSTATISTICS System Table Description

Description

Lists distinct counts and average key sizes for prefixes of index keys for all the indexes on persistent tables in the database.

Fields

Field Type Description

OBJECTID

bigint

The database object ID for the index

CATALOGID

bigint

The database catalog ID for the index

PREFIXLENGTH

integer

The number of index key columns that this particular distinct count is valid for

DISTINCTCOUNT

bigint

An estimate of the number of distinct values with that prefix

AVERAGEKEYLENGTH

double

Average key size for the keys whose prefix count is given in this row

PREFIXNULLCOUNT

bigint

The number of null values for the prefix

COLUMNNULLCOUNT

bigint

The number of null values for the column

SOURCE

string

statistics or calculated
We calculate the first prefix, 2 columns of an index and the full key. All other values are interpolated.

  • statistics - means that this is a good faith estimate of the number of distinct values using actual values in the index keys

  • calculated - means that this value has been estimated using the available statistics based on actual values

MOSTFREQUENTPREFIXCOUNT

bigint

The count of records with the most frequently represented prefix

Indexes

None

Example

See Example under SYSTEM.INDEXSTATISTICS (INDEXSTATISTICS System Table Description).