所使用的mysql函数explain
语法:
explain < table_name >
例如: explain select * from t3 where id=3952602;
explain输出结果
+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+
详解输出结果
第四列 type
这列很重要,显示了连接使用了哪种类别,有无使用索引.
从最好到最差的连接类型为const、eq_reg、ref、range、indexhe和ALL
原文链接:https://www.cnblogs.com/sand-tiny/p/3977645.html
http://blog.csdn.net/u014470581/article/details/68065590
最后
以上就是可爱抽屉最近收集整理的关于如何检查mysql中建立的索引是否生效的检测方法及相关参数说明的全部内容,更多相关如何检查mysql中建立内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复