Re: [HACKERS] table partioning performance

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: "Steven Flatt" <steven(dot)flatt(at)gmail(dot)com>, "Colin Taylor" <colin(dot)taylor(at)gmail(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: [HACKERS] table partioning performance
Date: 2007-01-12 19:50:54
Message-ID: 1168631454.3990.129.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-01-12 19:59:20 Re: [HACKERS] [PATCHES] Patch to log usage of temporary files
Previous Message Guillaume Smet 2007-01-12 19:48:17 Re: [HACKERS] [PATCHES] Patch to log usage of temporary files

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Dobbrow 2007-01-13 00:31:09 Large table performance
Previous Message Carlos H. Reimer 2007-01-12 17:37:13 RES: Improving SQL performance