Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 4B5299FB281 for ; Fri, 12 Jan 2007 15:52:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 93789-07 for ; Fri, 12 Jan 2007 15:52:08 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id E103D9FB249 for ; Fri, 12 Jan 2007 15:52:15 -0400 (AST) thread-index: Acc2gyzWjf51C8K/QL+EGDfdhHCmMg== Received: from [192.168.0.22] ([84.12.155.249]) by mail01.enterprisedb.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 12 Jan 2007 14:52:22 -0500 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757 Content-Class: urn:content-classes:message Importance: normal Subject: Re: [HACKERS] table partioning performance From: "Simon Riggs" To: "Jim C. Nasby" Cc: "Steven Flatt" , "Colin Taylor" , 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> Content-Type: text/plain; charset="iso-8859-1" Date: Fri, 12 Jan 2007 19:50:54 +0000 Message-ID: <1168631454.3990.129.camel@silverbirch.site> MIME-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Jan 2007 19:52:22.0218 (UTC) FILETIME=[2CB762A0:01C73683] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/208 X-Sequence-Number: 22809 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