explain select * from sales_rep left join sales on sales.sales_rep = sales_rep.employee_number;
结果如下:
| table | type | possible_keys | key | key_len | ref | rows | extra |
| sales_rep | all | null | null | null | null | 5 | |
| sales | ref | sales_rep | sales_rep | 5 | sales_rep.employee_number | 2 |
列的描述:table-正在查看的表名;non_unique-1或1.0表示索引不能包含重复值(主键和唯一索引),1表示可以;key_name-索引名;seq_in_index-索引中列的顺序,从1开始;column_name-列名;collation-a或null,a表示索引以序升排列,null表示不排序;cardinality-索引中唯一值的个数;sub_part-如果整个列为索引,值为null,否则以字符表示索引的大小;packed-是否打包;null-如果列能包含null,则为yes;comment-各种注释。
更多:mysql 防火墙开放3306端口MySQL索引和优化查询
https://www.002pc.comhttps://www.002pc.com/mysql/5143.html
你可能感兴趣的MySQL,索引,查询,优化
