VDS Sphera Knowledge Base
| Main / Browse Categories / PostgreSQL / My PostgreSQL database is slow? |
My PostgreSQL database is slow?
|
If you do not frequently vacuum your PostgreSQL databases, the transaction logs will continue to build and your databases could become sluggish. The easiest way to maintain your databases, is to create a cronjob that will vacuum the database once a day.
Here is a sample cron entry that would do the job: 45 0 * * * /usr/local/pgsql/bin/vacuumdb -U postgres -v -z -d DATABASE_NAME >> /var/log/vacuumdb.log 2>&1Replace DATABASE_NAME with the actual name of your database. If you are not vacuuming your database(s) it can make the database slower over time.
If you are not familiar with how cron works inside your VDS, please refer to this article:
User Comments
|
||||||||
Attachments
| No attachments. |
Related Articles


