Re: postgresql is slow with larger table even it is in RAM

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: postgresql is slow with larger table even it is in RAM
Дата
Msg-id 47E8C72B.2010105@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: postgresql is slow with larger table even it is in RAM  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-performance
hubert depesz lubaczewski wrote:
> On Tue, Mar 25, 2008 at 02:05:20PM +0530, sathiya psql wrote:
>> Any Idea on this ???
>
> yes. dont use count(*).
>
> if you want whole-table row count, use triggers to store the count.
>
> it will be slow. regeardless of whether it's in ram or on hdd.

In other words, if you're having performance problems please provide
EXPLAIN ANALYZE output from a more useful query that does real work,
rather than something like count(*).

COUNT(*) can be slow due to some MVCC limitations; it's been discussed
frequently here so you should search the archives for information.

--
Craig Ringer

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

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: postgresql is slow with larger table even it is in RAM
Следующее
От: "sathiya psql"
Дата:
Сообщение: what is the maximum number of rows in a table in postgresql 8.1