Re: Paged Query

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: Paged Query
Дата
Msg-id CABwTF4VdMvC=ka-W4x9KGv+Dq7B9q5b9ubk5QtMNtm9h+NTHXQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Paged Query  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-performance
On Mon, Jul 9, 2012 at 1:46 PM, Andrew Dunstan <andrew@dunslane.net> wrote:

On 07/09/2012 01:41 PM, Misa Simic wrote:


From my experience users even very rare go to ending pages... easier to them would be to sort data by field to get those rows in very first pages...




Yeah, the problem really is that most client code wants to know how many pages there are, even if it only wants one page right now.

FWIW, I wrote a little about getting the numbered results along with total result count in one query[1]. The suggestions in comments to use CTE provided even better performance.

[1] http://gurjeet-tech.blogspot.com/2011/02/pagination-of-results-in-postgres.html

Best regards,
--
Gurjeet Singh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Paged Query
Следующее
От: Misa Simic
Дата:
Сообщение: Re: Paged Query