You are here: Reference Information > SQL Reference Information > SQL System Tables > INDEXPREFIXSTATISTICS System Table Description

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.
Client applications should never contain code that accesses SYSTEM pseudo tables as they are subject to, and furthermore likely to, change from release to release.

Fields

Field Type Description
OBJECTID integer The database object ID for the index
CATALOGID integer 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
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

Indexes

None

Example

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