这个查询:select count(*) from planner_event需要很长时间才能运行 - 太长了,我在它完成之前放弃并杀死了它。但是,当我运行时explain select count(*) from planner_event,我可以在输出中看到一列带有行数 (14m)。
select count(*) from planner_event
explain select count(*) from planner_event
为什么explain可以立即得到行数,而count(*)却需要很长时间才能运行?
mysql count explain
count ×1
explain ×1
mysql ×1