Re: postgresql performace degrading after a while

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: postgresql performace degrading after a while
Дата
Msg-id 5098.1138633057@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: postgresql performace degrading after a while  ("Ron Marom" <ron@bitband.com>)
Список pgsql-general
"Ron Marom" <ron@bitband.com> writes:
> Indeed I forgot to mention that I AM vacuuming the database using a
> daemon every few hours; however this seems not to be the issue this
> time, as when the CPU consumptions went up I tried to vacuum manually
> and this seemed to take no affect.

This is not nearly often enough.  You stated that the problem table
contains 67 records and all of them are updated every 30 seconds.
Therefore, after one hour the table contains 67 live records and
8040 dead ones, and a slowdown on the order of 100x is not exactly
surprising.

I would recommend vacuuming this specific table every five minutes or
less via a cron job.  Or even fix that application daemon to issue
a vacuum after each time it updates the table --- if there are never
more than 67 dead rows then vacuuming won't take long.

After you update to 8.1 you might want to consider using autovacuum
instead of a hand-tuned cron script.

            regards, tom lane

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

Предыдущее
От: Sim Zacks
Дата:
Сообщение: Re: schema rename sequence issue
Следующее
От: Tom Lane
Дата:
Сообщение: Re: schema rename sequence issue