Paginating searchs = performance problem

From: Date: Fri, 20 Oct 2006 15:04:35 +0000
Subject: Paginating searchs = performance problem
Groups: php.general 
Request: Send a blank email to php-general+get-243401@lists.php.net to get a copy of this message
I have PHP/PostgreSQL application were i got a search page with some items to search, am building the search query on server side. I need to display a paginated search and for this i need to get the total count of lines matching the search before OFFSET/LIMITing my page, am i obliged to repeat the query twice ??? first to get the total count, second to get my page. it's very heavy Any one's suggesting better doing ?

« previous php.general (#243401) next »