Our production moodle database (postgres 8.1.18) has grown to 38 GIG in size. The database is currently showing intermittently poor performance.
We find that when we backup and restore the database, it restores to a 22 GIG database. So apparently, we have a lot of gas in the production database and we think this is perhaps contributing to the problem.
We do have autovacuum turned on, and have implemented many of the standard tuning options. We have not run a full vacuum in a long time, mainly because it takes so long (on the order of 10 hours, I believe).
We would like to try running the cluster function instead. According to postgres documentation, this is a better, faster option than full vacuum and should offer some performance improvements as well as allow us to recover some disk space.
The cluster option is explained here : http://www.postgresql.org/docs/8.1/interactive/sql-cluster.html
First, has anyone run this function and what has your experience been with it?
Second, when I run this option on our server, it completes instantaneously. Specifically, if I go into phppgadmin, then go into the db, then click on ADMIN, then click on the cluster button, it immediately returns a message saying "cluster complete". I've also tried running the "cluster" SQL command with the same basic result. I'm assuming that nothing is really happening. Does anyone know why?
Thanks, -- john