Zend_Paginator - Increase querys
Posted
by poru
on Stack Overflow
See other posts from Stack Overflow
or by poru
Published on 2010-04-07T13:04:17Z
Indexed on
2010/04/07
13:13 UTC
Read the original article
Hit count: 392
zend-framework
|zend-paginator
Hello,
I started using Zend_Paginator, it works everything fine but I noticed that there is one more query which slows the load time down. The additional query:
SELECT COUNT(1) AS `zend_paginator_row_count` FROM `content`
The normal query:
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);
Could I merge the two querys into one (for better performance)?
© Stack Overflow or respective owner