From: | "Steven Flatt" <steven(dot)flatt(at)gmail(dot)com> |
---|---|
To: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
Cc: | "Colin Taylor" <colin(dot)taylor(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: table partioning performance |
Date: | 2007-01-10 21:39:06 |
Message-ID: | 357fa7590701101339m53a4b12foc805ff0060be609b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
On 1/10/07, Jim C. Nasby <jim(at)nasby(dot)net> wrote:
>
> Except for the simplest partitioning cases, you'll be much better off
> using a trigger on the parent table to direct inserts/updates/deletes to
> the children. As a bonus, using a trigger makes it a lot more realistic
> to deal with an update moving data between partitions.
In our application, data is never moved between partitions.
The problem I found with triggers is the non-robustness of the PLpgSQL
record data type. For example, in an "on insert" trigger, I can't determine
the fields of the NEW record unless I hard code the column names into the
trigger. This makes it hard to write a generic trigger, which I can use for
all our partitioned tables. It would have been somewhat of a pain to write
a separate trigger for each of our partitioned tables.
For that and other reasons, we moved some of the insert logic up to the
application level in our product.
Steve
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-01-10 23:00:13 | Re: installcheck vs regression DLLs |
Previous Message | Steven Flatt | 2007-01-10 21:00:00 | Re: table partioning performance |
From | Date | Subject | |
---|---|---|---|
Next Message | Jeremy Haile | 2007-01-10 21:48:42 | Re: High inserts, bulk deletes - autovacuum vs scheduled |
Previous Message | Scott Marlowe | 2007-01-10 21:30:16 | Re: Partitioning |