From: Chander Ganesan <chander@otg-nc.com>
To: Charles.Hou <ivan.hou@msa.hinet.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: the right time to vacuum database?
Date: Tue, 05 Jun 2007 09:12:21 -0400
Message-ID: <46656135.5050806@otg-nc.com> (raw)
In-Reply-To: <1181039589.643323.59660@r19g2000prf.googlegroups.com>
References: <1181039589.643323.59660@r19g2000prf.googlegroups.com>
Charles.Hou wrote:
> how can i know that it's the time to vacuumdb? i set the crontab to
> vacuumdb 3 times in one day. because my database size increase from
> 440MB to 460MB in 8 hours.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
What Version of PostgreSQL are you using? If it's recent ( > 8.1) you
might benefit from using AutoVacuum (AVD), which will take care of
vacuuming for you once table fragmentation (the ratio of dead tuples to
total tuples) becomes an issue. Otherwise, it's hard to tell based on
your metric above. You may have one small table that is updated a lot
(in which case a vacuum is a good idea on that table) or lots of tables
that are updated a little (in which its probably overkill). Your best
bet might be to turn on row level stats collection and look at the
statistics to see if one or more tables is becoming fragmented (BTW,
this is what AVD does). 440 to 460 doesn't seem to significant to me,
but it all depends on the size of your tables, update/delete profile, etc.
--
Chander Ganesan
The Open Technology Group
One Copley Parkway, Suite 210
Morrisville, NC 27560
Phone: 877-258-8987/919-463-0999
http://www.otg-nc.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: chander@otg-nc.com, ivan.hou@msa.hinet.net, pgsql-admin@postgresql.org
Subject: Re: the right time to vacuum database?
In-Reply-To: <46656135.5050806@otg-nc.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox