mysql 查看索引使用情况
查看索引的使用情况
Show status like’handler_read%’;
mysql> show status like'handler_read%';
+-----------------------+----------+
| Variable_name | Value |
+-----------------------+----------+
| Handler_read_first | 0 |
| Handler_read_key | 2301146 |
| Handler_read_last | 0 |
| Handler_read_next | 0 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 0 |
| Handler_read_rnd_next | 80846251 |
+-----------------------+----------+
7 rows in set (0.01 sec)
handler_read_key是索引用的次数
结论:handler_read_key越大越好
hand_read_next越小越好