Re: Identical query slower on 8.4 vs 8.3

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Patrick Donlin" <pdonlin(at)oaisd(dot)org>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Identical query slower on 8.4 vs 8.3
Date: 2010-07-15 15:53:20
Message-ID: 4C3EE8A00200002500033637@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Patrick Donlin <pdonlin(at)oaisd(dot)org> wrote:

> I have run vacuumdb --full --analyze, it
> actually runs as a nightly cron job.

That's usually not wise -- VACUUM FULL can cause index bloat, and is
not normally necessary. If you have autovacuum turned on and run a
database vacuum each night, you can probably avoid ever running
VACUUM FULL. A long-running transaction or mass deletes might still
make aggressive cleanup necessary on occasion, but you should
consider using CLUSTER instead of VACUUM FULL. So, you should
probably change your crontab job to vacuum --all --analyze.

Also, after a bulk load of a database like this you might consider a
one-time VACUUM FREEZE of the database. Without that there will
come a time when autovacuum will need to rewrite all rows from the
bulk load which haven't subsequently been modified, in order to
prevent transaction ID wraparound problems.

-Kevin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2010-07-15 16:04:13 Re: Identical query slower on 8.4 vs 8.3
Previous Message Jon Nelson 2010-07-15 15:34:56 Re: Identical query slower on 8.4 vs 8.3