Forum .LRN Q&A: Re: slow select statement

Collapse
4: Re: slow select statement (response to 1)
Posted by Jarkko Laine on
Tom,
you might want to make a script that vacuums your database automatically daily. If you're making a daily backup, that should of course be made before the vacuum, just in case it screws up your db.

The pg backup script (see documentation) makes also the vacuuming. You might want to check it for an example.

Collapse
5: Re: slow select statement (response to 4)
Posted by Tom Lodge on
JarkKo,

Thanks for the info.  Will do.

Collapse
6: Re: slow select statement (response to 4)
Posted by Tom Lodge on
Jarkko,

Many thanks - will do.

Collapse
7: Debian vacuum script (response to 4)
Posted by Andrew Piskorski on
Btw, the Debian PostgreSQL package ships with such a nigtly vacuum script. Basically, entries in /etc/cron.d/postgresql call /usr/lib/postgresql/bin/do.maintenance with various options.