Search Postgresql Archives

Re: postgresql performace degrading after a while

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Ron Marom" <ron@xxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux