The INFORMATION_SCHEMA INNODB_SYS_INDEXES
Table
The INNODB_SYS_INDEXES
table provides status information about InnoDB
indexes, equivalent to the information from the SYS_INDEXES
table in the InnoDB
data dictionary.
Table 18.7. INNODB_SYS_INDEXES
Columns
Column name | Description |
---|---|
INDEX_ID
| An identifier for each index that is unique across all the databases in an instance. |
NAME
| The name of the index. User-created indexes have names in all lowercase. Indexes created implicitly by InnoDB have names in all lowercase. The index names are not necessarily unique. Indexes created implicitly by InnoDB have consistent names: PRIMARY for a primary key index, GEN_CLUST_INDEX for the index representing a primary key when one is not specified, ID_IND , FOR_IND for validating a foreign key constraint, and REF_IND .
|
TABLE_ID
| An identifier representing the table associated with the index; the same value from INNODB_SYS_TABLES.TABLE_ID .
|
TYPE
| A numeric identifier signifying the kind of index, in the range 0..3. |
N_FIELDS
| The number of columns in the index key. For the GEN_CLUST_INDEX indexes, this value is 0 because the index is created using an artificial value rather than a real table column.
|
PAGE_NO
| |
SPACE
| An identifier for the tablespace where the index resides. 0 means the InnoDB system tablespace. Any other number represents a table created in file-per-table mode with a separate .ibd file. This identifier stays the same after a TRUNCATE TABLE statement. Because all indexes for a table reside in the same tablespace as the table, this value is not necessarily unique. |
Notes:
- Since the
INFORMATION_SCHEMA
is a general-purpose way to monitor the MariaDB server, use this table rather than the correspondingInnoDB
system table for any new monitoring application you develop.
- You must have the
PROCESS
privilege to query this table.