- simple (不含子查询)
- primary(含有子查询或派生查询)
- subquery (非from子查询)
- derived (from型子查询)
- union
- union result
- all < index < range < ref < eq_ref < (const, system, null)
- all 全表扫描
- index 扫描索引树上全部的索引节点
- range 根据索引做范围的扫描
- ref 通过索引列,直接引用到某些数据行
- eq_ref 通过索引列,直接引用一行数据,常用于连接中
- 一般按照主键查询时,易出现const, system 当查询不经过表时会出现null
- 真实的表名
- 临时表 如as tmp
- derived 如from型子查询
- null 不使用表
- 连接查询时,表之间字段的引用关系
- 可能使用的索引
- 最终使用的索引
- 实际使用索引的长度
- 估计要扫描多少行
- using index 用到了索引覆盖
- using where 光靠索引定位不了,还得where判断一下
- using temporary 用到了临时表,效果已经非常不好了
- using filesort 文件排序,可能在磁盘,也可能在内存中
Mysql索引优化2
标签:extra 解释 post sele 文件 plain div 就是 查询