Re: partition insert performance - Mailing list pgsql-admin

From Scott Marlowe
Subject Re: partition insert performance
Date
Msg-id dcc563d10906151132r2d60baecxb4ecb94c60a2f300@mail.gmail.com
Whole thread Raw
In response to Re: partition insert performance  (Gurjeet Singh <singh.gurjeet@gmail.com>)
Responses Re: partition insert performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: partition insert performance  (Dimitri Fontaine <dfontaine@hi-media.com>)
List pgsql-admin
On Mon, Jun 15, 2009 at 11:35 AM, Gurjeet Singh<singh.gurjeet@gmail.com> wrote:
> On Mon, Jun 15, 2009 at 10:57 PM, Scott Marlowe <scott.marlowe@gmail.com>
> wrote:
>>
>> On Mon, Jun 15, 2009 at 8:17 AM, Anj Adu<fotographs@gmail.com> wrote:
>> > We currently use triggers with static if..then..else statements to
>> > determine
>> > which partition the data goes into. Would there be a performance impact
>> > if
>> > we were to use dynamic sql to achieve the same ?. The issue with static
>> > triggers is the maintenance overhead of having to redefine the triggers
>> > periodically. The dynamic sql is simple and involves building a sql
>> > string
>> > with just a to_char(date_Field) to determine which partition the data
>> > goes
>> > into and the trigger will never have to be re-defined.
>>
>> If you're using plpgsql prepare for a world of pain if you've got any
>> null values in your inserts.
>
> :) Using COALESCE isn't that bad.

In my experience it's WAY more than just coalesce.

pgsql-admin by date:

Previous
From: Gurjeet Singh
Date:
Subject: Re: partition insert performance
Next
From: Tom Lane
Date:
Subject: Re: partition insert performance