【发布时间】:2009-11-19 07:03:30
【问题描述】:
select field1,count(*) from table where $condition group by field1
select field2,count(*) from table where $condition group by field2
基本上这就是我现在正在做的工作,有没有办法优化性能,以便 MySQL 不需要搜索两次来分组 where 子句?
【问题讨论】:
-
你能改写语句“这样 MySQL 不需要搜索两次来分组 where 子句”