Re: Double query (limit and offset)

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Double query (limit and offset)
Дата
Msg-id 4355F4FD.5080006@archonet.com
обсуждение исходный текст
Ответ на Double query (limit and offset)  (Michael Landin Hostbaek <mich@freebsdcluster.org>)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Janning Vygen
Дата:
Сообщение: Re: Double query (limit and offset)
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: Query information needed