mysql explain 执行计划
作者:
程序男保姆 | 来源:发表于
2021-06-18 09:48 被阅读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
本文标题:mysql explain 执行计划
本文链接:https://www.haomeiwen.com/subject/lgrfyltx.html
网友评论