Re: CREATE TABLE slowing down significantly over time - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: CREATE TABLE slowing down significantly over time
Date
Msg-id dcc563d10911090733u416e5c06mf1f960ae4268b9de@mail.gmail.com
Whole thread Raw
In response to Re: CREATE TABLE slowing down significantly over time  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: CREATE TABLE slowing down significantly over time  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-performance
On Mon, Nov 9, 2009 at 5:22 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Sat, Nov 7, 2009 at 11:58 PM, Aris Samad-Yahaya
> <aris@quickschools.com> wrote:
>> We vacuum analyze nightly, and vacuum normally ad-hoc (but we're going to
>> schedule this weekly moving forward).
>>
>> Interesting pointer about system catalog bloat. I tried to vacuum full the
>> system catalog tables (pg_*), and the performance for creating a single
>> table manually improved dramatically (back to what it used to be), but as
>> soon as I created the next schema, the performance went back down to the
>> same level.
>>
>> So there's a clue there somewhere. Next I will try to vacuum full the entire
>> database.
>
> You should really enable autovacuum.  You'll probably have to VACUUM
> FULL and REINDEX to clean everything up, but after that autovacuum
> should be MUCH more effective than a nightly vacuum run.  If you're
> running some ancient Pg version where autovacuum is not enabled by
> default, you should also consider upgrading.  There are a lot of
> goodies (including performance enhancements) in newer versions.

Also note that the argument that autovacuum chews up too much IO is
moot now that you can set cost delay to 10 to 20 milliseconds.  Unless
you're running on the hairy edge of maximum IO at all times, autovac
should be pretty much unnoticed.

pgsql-performance by date:

Previous
From: Anj Adu
Date:
Subject: Re: CREATE TABLE slowing down significantly over time
Next
From: Robert Haas
Date:
Subject: Re: CREATE TABLE slowing down significantly over time