Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果查询已经有语句,是否COUNT(*)会对 MySQL 性能产生重大影响。GROUP BY
COUNT(*)
GROUP BY
表引擎是 InnoDB。
EXPLAIN SELECT <...>提供相同的输出。
EXPLAIN SELECT <...>
如果输出explain相同,则没有区别。无论如何,计算行数对性能没有显着影响。
explain