首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

explain SQL话语性能检测

2012-09-17 
explain SQL语句性能检测mysqlexplain select * from table+----+-------------+-------+------+-------

explain SQL语句性能检测

mysql>explain select * from table;
+----+-------------+-------+------+---------------+------+---------+------+------+-------+
| id | select_type | table | type | possible_keys | key? | key_len | ref? | rows | Extra |
+----+-------------+-------+------+---------------+------+---------+------+------+-------+


table????????? #显示该语句涉及的表
type?????????? #反映语句的质量,优-->差:const > eq_reg > ref > range > indexhe > ALL
possible_keys
? #存在表中的所有索引
key??????????? #使用到的索引
key_len??????? #索引长度,越短越好
ref??????????? #显示索引的那一列被用到
rows?????????? #语句返回的数据行数
extra????????? #语句查询情况的详细信息

热点排行