Re: Vacuum is needed or not?

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Jaime Casanova <systemguards(at)gmail(dot)com>
Cc: Szabolcs BALLA <szabolcs(dot)balla(at)confinsystems(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Vacuum is needed or not?
Date: 2006-01-13 19:18:47
Message-ID: 20060113191847.GK9017@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Jan 12, 2006 at 11:21:19PM -0500, Jaime Casanova wrote:
> On 1/5/06, Szabolcs BALLA <szabolcs(dot)balla(at)confinsystems(dot)com> wrote:
> > Hi,
> >
> > How do I know vacuum is need or not? I mean, are there any query to know
> > status of statistics, tables, indexes, etc?
>
> at least, once every billion transactions to be safe...
>
> > (7.4.7)
> > Our database size bigger than just go and do it. :(
> >
>
> ahh... then execute it once a week or once a day, for avoid excessive growing...

Even once a day can be awefully conservative for many databases. Keep in
mind that every single row that is updated or deleted will hang around
in the database until you vacuum; on a busy system that can result in a
lot of wasted space. And once the bloat is there, it can be hard to get
rid of.

7.4.7 has contrib/pg_autovacuum, and I highly recommend it. Also,
http://lnk.nu/pervasive-postgres.com/7m4.asp and
http://lnk.nu/pervasive-postgres.com/7jd.asp might be interesting reads
for you.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jim C. Nasby 2006-01-13 19:30:34 Re: OIDS problem
Previous Message Brian A. Seklecki 2006-01-13 17:19:38 Re: PKI/SSL Client/Server Certificate Authentication