mysql explain 执行计划

2021-06-18  本文已影响0人  程序男保姆
explain select * from student
id select查询的序列号。ID越大越先执行,ID相同从上至下执行。
select_type 查询类型,常见的取值有(simple primary union subquery)
table 输出结果集的表
partitions 分区(如果没有使用到分区则为null)
type 表示表的链接类型,性能由好到差的链接类型为(system > const > eq_ref > ref >
       ref_or_null > index_merge > index_subquery > range > index > all)
possible_keys 可能使用的索引
key 实际使用的索引
key_len 索引字段的长度
ref 
rows 扫描行数量
filtered 扫描行百分比(越大越好)
extra 执行情况的说明和描述
image.png
上一篇 下一篇

猜你喜欢

热点阅读