#1 wltony
由于数据表内有几百万条数据,而SP分页程序 spModel.php 436行使用SELECT COUNT({$this->model_obj->pk}) 后面如果有where 条件
如sql语句 select count(id) from table where letter='a';
使用了select count(id) 使得Mysql的占用cpu很高,建议修改成select count(*) 比较合适,或者直接传递参数进去也可以,不要都使用主键;当然findCount也是一样问题;
2011-12-31 14:40:13