(mysql.info.gz) SHOW INDEX
Info Catalog
(mysql.info.gz) SHOW GRANTS
(mysql.info.gz) SHOW
(mysql.info.gz) SHOW INNODB STATUS
13.5.4.11 `SHOW INDEX' Syntax
.............................
SHOW INDEX FROM TBL_NAME [FROM DB_NAME]
`SHOW INDEX' returns table index information in a format that resembles
the `SQLStatistics' call in ODBC.
`SHOW INDEX' returns the following fields:
`Table'
The name of the table.
`Non_unique'
0 if the index can't contain duplicates, 1 if it can.
`Key_name'
The name of the index.
`Seq_in_index'
The column sequence number in the index, starting with 1.
`Column_name'
The column name.
`Collation'
How the column is sorted in the index. In MySQL, this can have
values `A' (Ascending) or `NULL' (Not sorted).
`Cardinality'
The number of unique values in the index. This is updated by
running `ANALYZE TABLE' or `myisamchk -a'. `Cardinality' is
counted based on statistics stored as integers, so it's not
necessarily accurate for small tables. The higher the cardinality,
the greater the chance that MySQL will use the index when doing
joins.
`Sub_part'
The number of indexed characters if the column is only partly
indexed. `NULL' if the entire column is indexed.
`Packed'
Indicates how the key is packed. `NULL' if it is not.
`Null'
Contains `YES' if the column may contain `NULL'. If not, the column
contains `NO' as of MySQL 5.0.3, and `''' before that.
`Index_type'
The index method used (`BTREE', `FULLTEXT', `HASH', `RTREE').
`Comment'
Various remarks. Before MySQL 4.0.2 when the `Index_type' column
was added, `Comment' indicates whether an index is `FULLTEXT'.
The `Packed' and `Comment' columns were added in MySQL 3.23.0. The
`Null' and `Index_type' columns were added in MySQL 4.0.2.
You can use DB_NAME.TBL_NAME as an alternative to the `TBL_NAME FROM
DB_NAME' syntax. These two statements are equivalent:
mysql> SHOW INDEX FROM mytable FROM mydb;
mysql> SHOW INDEX FROM mydb.mytable;
`SHOW KEYS' is a synonym for `SHOW INDEX'. You can also list a table's
indexes with the `mysqlshow -k DB_NAME TBL_NAME' command.
Info Catalog
(mysql.info.gz) SHOW GRANTS
(mysql.info.gz) SHOW
(mysql.info.gz) SHOW INNODB STATUS
automatically generated byinfo2html