Thread: Re: When do I Vacuum ?
could someone please post an answer, even if it's just a pointer to somewhere else ... please .... :-) Steve "Steve Brett" <steve.brett@e-mis.com> wrote in message news:9ufpug$217v$1@news.tht.net... > hi, > > I've got a DB driven web application which currently has approx 298 inserts > per day and 540 edits/deletes. > > This figure will change daily and currently i have a cron job set up to > vacuum the database every hour during 'work time': > > 0 7-19/1,23 * * * /usr/local/pgsql/bin/vacuumdb -z -d edb > 30 7-19/4,23 * * * /backup/dumpit > > I've also started reading Bruce's book (and what a fine book it is ... :-) > and noticed that he suggests vacuuming once a day when the db is quiet. > > Would this be sufficient ? The database drives a web based > calendar/appointment booking/reporting system i've written in php and is > used extensively by 3 departments and has approx 200 people log in each day. > > Needless to say speed it paramount but I've got a sneaky feeling I might be > vacuuming too often .... > > Many thanks for you help, > > Steve > >
Steve, Just to have an answer out there (being no expert); it seems to me that you have very little traffic on your database, and vacuuming once a day is probably plenty. My database has several thousand inserts/edits/deletes per day and I've found that I don't have significant performance changes if I forget to vacuum every day. Thanks, Peter Darley -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Steve Brett Sent: Monday, December 03, 2001 7:37 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] When do I Vacuum ? could someone please post an answer, even if it's just a pointer to somewhere else ... please .... :-) Steve "Steve Brett" <steve.brett@e-mis.com> wrote in message news:9ufpug$217v$1@news.tht.net... > hi, > > I've got a DB driven web application which currently has approx 298 inserts > per day and 540 edits/deletes. > > This figure will change daily and currently i have a cron job set up to > vacuum the database every hour during 'work time': > > 0 7-19/1,23 * * * /usr/local/pgsql/bin/vacuumdb -z -d edb > 30 7-19/4,23 * * * /backup/dumpit > > I've also started reading Bruce's book (and what a fine book it is ... :-) > and noticed that he suggests vacuuming once a day when the db is quiet. > > Would this be sufficient ? The database drives a web based > calendar/appointment booking/reporting system i've written in php and is > used extensively by 3 departments and has approx 200 people log in each day. > > Needless to say speed it paramount but I've got a sneaky feeling I might be > vacuuming too often .... > > Many thanks for you help, > > Steve > > ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org
"Steve Brett" <steve.brett@e-mis.com> writes: > could someone please post an answer, even if it's just a pointer to > somewhere else ... please .... Sorry, I just got your message--looks like the list got hung up for a little while. The nice thing about VACUUM is that if you're running it "too often" it won't have very much work to do so it'll complete very quickly. The only thing to watch out for is lock contention between VACUUM and "real work" (which is why Bruce suggests running it at quiet times). So once an hour isn't going to hurt anything most likely, though it is probably overkill for your current situation. -Doug -- Let us cross over the river, and rest under the shade of the trees. --T. J. Jackson, 1863