explain 分析 聚合统计语句的性能

 

EXPLAIN SELECT COUNT(1) FROM question;

id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE question index uid 4 18559829 100 Using index

EXPLAIN SELECT COUNT(*) FROM question;


id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE question index uid 4 18542063 100 Using index
;

EXPLAIN SELECT COUNT(*) AS "aggregation" FROM question;

id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE question index uid 4 18588130 100 Using index

 

posted @ 2018-12-19 16:29  papering  阅读(346)  评论(0)    收藏  举报