标签:os 使用 on ef c sql type mysql table
mysql> explain select * from xuehao;
+----+-------------+--------+------+---------------+------+---------+------+------+-------+
| id | select_type | table  | type | possible_keys | key  | key_len | ref  | rows | Extra |
+----+-------------+--------+------+---------------+------+---------+------+------+-------+
|  1 | SIMPLE      | xuehao | ALL  | NULL          | NULL | NULL    | NULL |    8 | NULL  |
+----+-------------+--------+------+---------------+------+---------+------+------+-------+
1 row in set (0.03 sec)
type
all 全表扫描,mysql遍历全表来找到匹配的行
index 索引全扫描,mysql遍历整个索引来查询匹配的行
range 索引范围扫描,常见于<,<=,>,>=,between等操作
ref 使用非唯一索引扫描或唯一索引的前缀扫描
eq_ref 使用的索引时唯一索引
const/system 表中最多有一个匹配行
NULL 不访问表或者索引,直接就能够得到结果
标签:os 使用 on ef c sql type mysql table
原文地址:http://www.cnblogs.com/lehao/p/3936981.html