Re: Rapidly decaying performance repopulating a large table

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "David Wilson" <david(dot)t(dot)wilson(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Rapidly decaying performance repopulating a large table
Date: 2008-04-22 21:18:47
Message-ID: dcc563d10804221418k606df0evfbced68264879be0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 22, 2008 at 3:15 PM, David Wilson <david(dot)t(dot)wilson(at)gmail(dot)com> wrote:
> On Tue, Apr 22, 2008 at 5:04 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> > Normally, after the first 50,000 or so the plan won't likely change
> > due to a new analyze, so you could probably just analyze after 50k or
> > so and get the same performance. If the problem is a bad plan for the
> > inserts / copies.
> >
> > also, non-indexed foreign keyed fields can cause this problem.
> >
>
> Analyzing after the first 50k or so is easy enough, then; thanks for
> the suggestion.
>
> Foreign keys are definitely indexed (actually referencing a set of
> columns that the foreign table is UNIQUE on).
>
> Any other suggestions? COPY times alone are pretty much quadrupling my
> table-rebuild runtime, and I can interrupt the current rebuild to try
> things pretty much at a whim (nothing else uses the DB while a rebuild
> is happening), so I'm pretty much game to try any reasonable
> suggestions anyone has.

Try upping your checkpoint segments. Some folks find fairly large
numbers like 50 to 100 to be helpful. Each segment = 16Megs, so be
sure not to run your system out of drive space while increasing it.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2008-04-22 21:28:22 Re: How to modify ENUM datatypes?
Previous Message David Wilson 2008-04-22 21:15:11 Re: Rapidly decaying performance repopulating a large table