Re: Pre-creating partitions incurs insert penalty

From: Anj Adu <fotographs(at)gmail(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Pre-creating partitions incurs insert penalty
Date: 2009-05-29 00:43:20
Message-ID: f2fd819a0905281743na5f4349va2b75ab914c7fdea@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Partitioning is implemented via rules and check constraints to ensure
partition integrity.

On Thu, May 28, 2009 at 5:21 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>wrote:

> On Thu, May 28, 2009 at 5:22 PM, Anj Adu <fotographs(at)gmail(dot)com> wrote:
> > I noticed a very strange performance issue after I pre-create daily
> > partitions for the next month on a table that has a very large insert
> volume
> > (30 million a day). After the partitions are created..the inserts seem to
> > slow down. I verifiied that this was the issue by dropping the
> > partitions...When I dropped the pre-created partitions..the performance
> > issue disappeared. Looks like you cannot have too many partitions (in
> this
> > case..I had a total of 35 partitions when the performance issue was
> noticed)
>
> How are you enforcing partiitoning on your inserts? Via app
> knowledge, triggers, or rules? I'd expect rules might have a penalty
> with more partitions, but not expect it from app or trigger based
> partitioning.
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2009-05-29 00:46:29 Re: Pre-creating partitions incurs insert penalty
Previous Message Scott Marlowe 2009-05-29 00:21:13 Re: Pre-creating partitions incurs insert penalty