Re: COUNT & Pagination

Поиск
Список
Период
Сортировка
От David Shadovitz
Тема Re: COUNT & Pagination
Дата
Msg-id 01C3D8DF.271378C0.david@shadovitz.com
обсуждение исходный текст
Ответ на COUNT & Pagination  (David Shadovitz <david@shadovitz.com>)
Ответы Re: COUNT & Pagination  (Robert Treat <xzilla@users.sourceforge.net>)
Список pgsql-performance
> If you only need the count when you've got the results, most PG client
> interfaces will tell you how many rows you've got. What language is your app
> in?

PHP.
But I have only a subset of the results, retrieved via a query with a "LIMIT
<m>" clause, so $pg_numrows is m.
And retrieving all results (i.e. no LIMIT) is at least as expensive as
COUNT(*).

-David

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

Предыдущее
От: Andrew Rawnsley
Дата:
Сообщение: Re: annoying query/planner choice
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: failures on machines using jfs