我开始使用 Zend_Paginator,一切正常,但我注意到还有一个查询会减慢加载时间。附加查询:
SELECT COUNT(1) AS `zend_paginator_row_count` FROM `content`
正常查询:
SELECT `content`.`id`, `content`.`name` FROM `content` LIMIT 2
PHP:
$adapter = new Zend_Paginator_Adapter_DbSelect($table->select()->from($table, array('id', 'name')));
$paginator = new Zend_Paginator($adapter);
我可以将两个查询合并为一个(以获得更好的性能)吗?