sql 执行计划——EXPLAIN之select_type

1. simple:简单查询,查询中不包含子查询和UNION。

2. subquery:where语句里的子查询。

例如:select * from a where a_id in (select b_id from b);

3. derived:from语句里包含子查询。

例如:select count(*) from (select * from a) as der;

4. primary:子查询的上层查询。

猜你喜欢

转载自guwq2014.iteye.com/blog/2278575