Re: Vacuum is needed or not? - Mailing list pgsql-admin

From Jim C. Nasby
Subject Re: Vacuum is needed or not?
Date
Msg-id 20060113191847.GK9017@pervasive.com
Whole thread Raw
In response to Re: Vacuum is needed or not?  (Jaime Casanova <systemguards@gmail.com>)
List pgsql-admin
On Thu, Jan 12, 2006 at 11:21:19PM -0500, Jaime Casanova wrote:
> On 1/5/06, Szabolcs BALLA <szabolcs.balla@confinsystems.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@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

pgsql-admin by date:

Previous
From: "Brian A. Seklecki"
Date:
Subject: Re: PKI/SSL Client/Server Certificate Authentication
Next
From: "Jim C. Nasby"
Date:
Subject: Re: OIDS problem