This is a discussion on Re: Double query (limit and offset) within the pgsql Sql forums, part of the PostgreSQL category; --> Michael Landin Hostbaek wrote: > List, > > I'm using the OFFSET / LIMIT combo in order to split ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Michael Landin Hostbaek wrote: > List, > > I'm using the OFFSET / LIMIT combo in order to split up my query, so it > only parses 20 rows at a time (for my php-scripted webpage). The best way to do it is to have a layer between your application and the database that can cache the results of your query. Unfortunately PHP is not ideal for this - you might want to google for "php memcache" and "pgmemcache" though. Once you can cache the query, you run it once, use the row-count and then fetch the rows from cache. -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |