开发者社区 问答 正文

MySQL查看表的索引情况

MySQL查看表的索引情况

展开
收起
Dynastys 2021-10-13 18:27:35 409 分享 版权
1 条回答
写回答
取消 提交回答
  • mysql> show index from books;
    +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
    +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    | books |          0 | name     |            1 | name        | A         |           1 |     NULL | NULL   | YES  | BTREE      |         |               |
    +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    1 row in set (0.01 sec)
    
    2021-10-13 18:38:49
    赞同 展开评论