Re: more problems with count(*) on large table

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: more problems with count(*) on large table
Дата
Msg-id 20071002074719.GB12469@svana.org
обсуждение исходный текст
Ответ на Re: more problems with count(*) on large table  (Bill Moran <wmoran@potentialtech.com>)
Список pgsql-general
On Mon, Oct 01, 2007 at 01:34:32PM -0400, Bill Moran wrote:
> This sounds like a caching issue.  My guess at what's happening is that
> other operations are pushing this data out of the shared_buffers, so
> when you run it, the system has to pull a bunch of tuples off the disk
> to check them.  If you run it again immediately, the tuples are still in
> memory, and it runs very fast.

You should check your ratio of system cache to shared_buffers. Pushing
things out of shared buffers isn't bad if you've got a much bigger OS
behind it. The cost of pulling something out of the OS cache is
negligable compared to really going to disk.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: how to ignore invalid byte sequence for encoding without using sql_ascii?
Следующее
От: Tomasz Ostrowski
Дата:
Сообщение: Re: more problems with count(*) on large table