Update MySQL_EXPLAIN.md
This commit is contained in:
parent
9af6ad877b
commit
2dbc4a2275
@ -13,9 +13,13 @@ mysql> EXPLAIN SELECT * FROM employees;
|
||||
|
||||
注:本篇文章所有的测试数据来均源于 MySQL 官方提供的 [Employees Sample Database](https://dev.mysql.com/doc/employee/en/),其数据库结构如下:
|
||||
|
||||
|
||||
<div align="center"> <img src="https://github.com/heibaiying/Full-Stack-Notes/blob/master/pictures/employees-schema.png"/> </div>
|
||||
|
||||
以下对 EXPLAIN 输出结果中各个字段的含义及其可能的取值范围做详细的介绍:
|
||||
|
||||
|
||||
|
||||
## 1. id
|
||||
|
||||
id 字段为行标识符,同时也表示该行语句执行的优先级,值越大则优先级越高。如果某行语句引用了其他行结果集的并集,则该值可以为 NULL。示例如下:
|
||||
@ -208,4 +212,4 @@ MySQL 为了找到目标行而读取的所有行的数量,这是一个估算
|
||||
|
||||
## 参考资料
|
||||
|
||||
MySQL官方文档:https://dev.mysql.com/doc/refman/8.0/en/explain-output.html
|
||||
MySQL官方文档:https://dev.mysql.com/doc/refman/8.0/en/explain-output.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user