Re: Paginating searchs = performance problem
| From: | Chris | Date: | Tue, 24 Oct 2006 01:58:52 +0000 |
| Subject: | Re: Paginating searchs = performance problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243548@lists.php.net to get a copy of this message | ||
Richard Lynch wrote:
On Fri, October 20, 2006 10:04 am, Fourat Zouari wrote:Cursors won't help - they don't store the info about how many results the query would fetch (I asked this question a few months ago on one of the postgres lists). -- Postgresql & php tutorials http://www.designmagick.com/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 ?Use a cursor.