Re: browsing table with 2 million records

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: browsing table with 2 million records
Дата
Msg-id 436030BC.1000404@familyhealth.com.au
обсуждение исходный текст
Ответ на browsing table with 2 million records  (aurora <aurora00@gmail.com>)
Список pgsql-performance
> We have a GUI that let user browser through the record page by page at
> about 25 records a time. (Don't ask me why but we have to have this
> GUI). This translates to something like
>
>   select count(*) from table   <-- to give feedback about the DB size
>   select * from table order by date limit 25 offset 0

Heh, sounds like phpPgAdmin...I really should do something about that.

> Tables seems properly indexed, with vacuum and analyze ran regularly.
> Still this very basic SQLs takes up to a minute run.

Yes, COUNT(*) on a large table is always slow in PostgreSQL.  Search the
mailing lists for countless discussions about it.

Chris


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

Предыдущее
От: "Steinar H. Gunderson"
Дата:
Сообщение: Re: Materializing a sequential scan
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: browsing table with 2 million records