Re: Serious issues with CPU usage - Mailing list pgsql-performance

From Tom Lane
Subject Re: Serious issues with CPU usage
Date
Msg-id 9957.1063029873@sss.pgh.pa.us
Whole thread Raw
In response to Re: Serious issues with CPU usage  (Andri Saar <andris@estpak.ee>)
Responses Re: Serious issues with CPU usage
List pgsql-performance
Andri Saar <andris@estpak.ee> writes:
> If this is the best you can get with postgres right now, then I'll just have
> to increase the frequency of VACUUMing, but that feels like a hackish
> solution :(

Not at all.  The overhead represented by VACUUM would have to be paid
somewhere, somehow, in any database.  Postgres allows you to control
exactly when it gets paid.

It looks to me like throwing a plain VACUUM into your poller cycle
(or possibly VACUUM ANALYZE depending on how fast the table's stats
change) would solve your problems nicely.

Note that once you have that policy in place, you will want to do one
VACUUM FULL, and possibly a REINDEX, to get the table's physical size
back down to something commensurate with 2700 useful rows.  I shudder
to think of where it had gotten to before.  Routine VACUUMing should
hold it to a reasonable size after that.

            regards, tom lane

pgsql-performance by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Serious issues with CPU usage
Next
From: Andri Saar
Date:
Subject: Re: Serious issues with CPU usage