VDS Sphera Knowledge Base

Main / Browse Categories / PostgreSQL / My PostgreSQL database is slow?

Print article Print Article    Email article Email Article

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>&1
Replace 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:
http://help.hardhathosting.com/question.php/55

User Comments
My PostgreSQL database is slow?  
There are no user comments for this topic.
 

Attachments
No attachments.

Related Articles
 Does PostgreSQL have a graphical user interface?
 How can I connect to PostgreSQL using PHP?
 What version of PostgreSQL are you running?
 Where can I find answers to frequently asked questions on PostgreSQL?
 Where can I find Technical Documentation on PostgreSQL?

Why Choose Our Hosting?

  • Unmatched Customer Support!
  • Virtual Private Server technology provides a rich, dedicated-like environment for every account.
  • We are known for our superb quality, performance and flexible hosting environment. We manage the server, software, and network you do the rest.
Continue reading »

Featured Hosting Plan


Learn more about our VPS Extreme

What is Included?

  • PHP 5/MySQL 5
  • Parallels® Plesk Panel 10
  • Unique IP Address
  • Daily VPS Backups (Off Server)
  • SAS Hardware Raid diskspace
  • CentOS 5 x86_64 bit
  • Multi-homed Tier 1 Bandwidth
  • Full Upgrade capabilities
Continue reading »