インデックス情報を表示する

show index from テーブル名;

mysql> show index from test_table;
+----------------+------------+----------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table          | Non_unique | Key_name       | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+----------------+------------+----------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| test_table     |          0 | PRIMARY        |            1 | topic_id    | A         |          27 |     NULL | NULL   |      | BTREE      |         |               |
| test_table     |          1 | fk_category_id |            1 | category_id | A         |          27 |     NULL | NULL   |      | BTREE      |         |               |
+----------------+------------+----------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
2 rows in set (0.00 sec)