Enable Heroku Postgresql autovacuum
heroku pg:psql --app app_name
ALTER TABLE table_name SET (autovacuum_vacuum_threshold = 50);
ALTER TABLE table_name SET (autovacuum_vacuum_scale_factor = 0.2);
ALTER TABLE table_name SET (autovacuum_enabled = true, toast.autovacuum_enabled = true);
For more information:
https://devcenter.heroku.com/articles/heroku-postgres-database-tuning
http://www.postgresql.org/docs/9.2/static/routine-vacuuming.html#AUTOVACUUM
Written by Rafael Souza
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Heroku
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#