statistics

statistics provides information about table indexes.

The following fields are provided in statistics:

FieldDescription
TABLE_CATALOGThe name of the catalog to which the table containing the index belongs. This value is always def.
TABLE_SCHEMAThe name of the database to which the table containing the index belongs.
TABLE_NAMEThe name of the table containing the index.
NON_UNIQUE0 if the index cannot contain duplicates, 1 if it can.
INDEX_SCHEMAThe name of the database to which the index belongs.
INDEX_NAMEThe name of the index. If the index is the primary key, the name is always PRIMARY.
SEQ_IN_INDEXThe column sequence number in the index, starting with 1.
COLUMN_NAMEThe column name. See also the description for the EXPRESSION column.
COLLATIONHow the column is sorted in the index. This can have values A (ascending), D (descending), or NULL (not sorted).
CARDINALITYAn estimate of the number of unique values in the index.
SUB_PARTThe index prefix. That is, the number of indexed characters if the column is only partly indexed, NULL if the entire column is indexed.
PACKEDIndicates how the key is packed. NULL if it is not.
NULLABLEContains YES if the column may contain NULL values and '' if not.
INDEX_TYPEThe index method used (BTREE, FULLTEXT, HASH, RTREE).
COMMENTInformation about the index not described in its own column, such as disabled if the index is disabled.
INDEX_COMMENTAny comment provided for the index with a COMMENT attribute when the index was created.
In this article