From: Simon Riggs <simon@2ndquadrant.com>
To: Jim C. Nasby <jim@nasby.net>
Cc: Steven Flatt <steven.flatt@gmail.com>
Cc: Colin Taylor <colin.taylor@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: [HACKERS] table partioning performance
Date: Fri, 12 Jan 2007 19:50:54 +0000
Message-ID: <1168631454.3990.129.camel@silverbirch.site> (raw)
In-Reply-To: <20070111210122.GR36267@nasby.net>
References: <84d3067d0701062037k3229c9ddjbde73b1fd79ee209@mail.gmail.com>
<357fa7590701081202p726c049ej61390dd1816d1369@mail.gmail.com>
<1168346933.3951.276.camel@silverbirch.site>
<357fa7590701101300m2812545k1487ca58e97970ed@mail.gmail.com>
<1168517751.3951.538.camel@silverbirch.site>
<20070111210122.GR36267@nasby.net>
On Thu, 2007-01-11 at 15:01 -0600, Jim C. Nasby wrote:
> I'm wondering if you see any issues with COPYing into a partitioned
> table that's using triggers instead of rules to direct data to the
> appropriate tables?
The data demographics usually guides you towards what to do.
You could COPY into the table that would receive most rows and use
before triggers to INSERT into the other tables, rather than the main
one. I'd be surprised if that was very fast for an even distribution
though. It could well be faster if you have a small number of rows into
a large number of targets because that would be quicker than re-scanning
a temp table repeatedly just to extract a few rows each time.
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: simon@2ndquadrant.com, jim@nasby.net, steven.flatt@gmail.com, colin.taylor@gmail.com
Subject: Re: [HACKERS] table partioning performance
In-Reply-To: <1168631454.3990.129.camel@silverbirch.site>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox