Should the auto vacuum turn on?
I have Postgresql 9.1 db running amazon ec2 / ebs. The database started to slow down. We have one table with 1 million records that seems to slow things down. When looking at the postgres configuration, we noticed that the autovacum parameter was commented out.
How to properly approach this problem. Should the autovacum turn on? Should we have some cron that autovacums at a given interval?
Also any thoughts / links on how to vacum prod db how to know if you need you would be appreciated. I am looking to learn. Thanks to
source to share
The frequency that autovacuum should run is based on how often your database changes records. If your database is constantly deleting and updating, you will often want to run autovacuum. If your database / schema just adds to the database and rarely updates or deletes, you won't need to run it very often.
Autovacuum is only intended to reclaim memory / disk space that the database is no longer using.
source to share