Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id D7F5C9FAC9B; Thu, 11 Jan 2007 17:01:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 38380-02; Thu, 11 Jan 2007 17:01:30 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 0EB499FB269; Thu, 11 Jan 2007 17:01:30 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id 4977B56408; Thu, 11 Jan 2007 15:01:29 -0600 (CST) Received: (hashcash-sendmail, from uid 1001); Thu, 11 Jan 2007 15:01:22 -0600 Date: Thu, 11 Jan 2007 15:01:22 -0600 From: "Jim C. Nasby" To: Simon Riggs Cc: Steven Flatt , Colin Taylor , pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] table partioning performance Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1168517751.3951.538.camel@silverbirch.site> X-Operating-System: FreeBSD 6.1-RELEASE-p10 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.13 (2006-08-11) X-Hashcash: 1:20:070111:simon@2ndquadrant.com::7ggrjKSkLXUov85J:0000000000000000 0000000000000000000000004A9b X-Hashcash: 1:20:070111:steven.flatt@gmail.com::Y5fR8hUu04quKkye:000000000000000 0000000000000000000000002GPJ X-Hashcash: 1:20:070111:colin.taylor@gmail.com::NhnhDydd/f3NoN9L:000000000000000 0000000000000000000000006g6G X-Hashcash: 1:20:070111:pgsql-performance@postgresql.org::/WiF9ikxKznmkbBg:00000 00000000000000000000000090AV X-Hashcash: 1:20:070111:pgsql-hackers@postgresql.org::KP1PNCvIQbQ9cCdi:000000000 000000000000000000000000CGbP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/185 X-Sequence-Number: 22786 On Thu, Jan 11, 2007 at 12:15:50PM +0000, Simon Riggs wrote: > On Wed, 2007-01-10 at 16:00 -0500, Steven Flatt wrote: > > On 1/9/07, Simon Riggs wrote: > > If you are doing date range partitioning it should be fairly > > simple to > > load data into the latest table directly. That was the way I > > originally > > intended for it to be used. The rules approach isn't something > > I'd > > recommend as a bulk loading option and its a lot more complex > > anyway. > > The problem we have with blindly loading all data into the latest > > table is that some data (< 5%, possibly even much less) is actually > > delivered "late" and belongs in earlier partitions. So we still > > needed the ability to send data to an arbitrary partition. > > Yes, understand the problem. > > COPY is always going to be faster than INSERTs anyhow and COPY doesn't > allow views, nor utilise rules. You can set up a client-side program to > pre-qualify the data and feed it to multiple simultaneous COPY commands, > as the best current way to handle this. > > -- > Next section aimed at pgsql-hackers, relates directly to above: 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? BTW, I think improved copy error handling would be great, and might perform better than triggers, once we have it... -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)