|
/**
* COUNT string
*
* @used-by CI_DB_driver::count_all()
* @used-by CI_DB_query_builder::count_all_results()
*
* @var string
*/
protected $_count_string = 'SELECT COUNT(*) AS ';
以上是DB_driver.php的代码。他定义这个属性,就是COUNT(*).
导致我每次使用count_all_results或count_all函数的时候,都要count(*),效率很慢。
所以请教一下,有没有什么好的方法?
|
|