explain中的type字段的一点细微区别
看到一篇文章https://blog.csdn.net/u012393450/article/details/79996074,其观点有待商榷,记录下自己的思考:
index: the entire index tree is scanned to find matching rows.all: the entire table is scanned to find matching rows for the join. This is the worst type of join and often indicates the lack of appropriate indexes on the table.
"index":Full Index Scan,索引全扫描,有索引,但是要把索引全扫一遍才能得到数据——这里用到的索引不一定是主键索引
- "ALL":Full Table Scan,没有合适的索引,所以只能走主键索引去做全扫描——这里用到的肯定是主键索引

浙公网安备 33010602011771号