X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E2FBD3A2307 for ; Sun, 5 Dec 2004 23:10:00 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01245-06 for ; Sun, 5 Dec 2004 23:09:52 +0000 (GMT) Received: from davinci.ethosmedia.com (server226.ethosmedia.com [209.128.84.226]) by svr1.postgresql.org (Postfix) with ESMTP id 884003A50E8 for ; Sun, 5 Dec 2004 23:09:53 +0000 (GMT) Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6748879; Sun, 05 Dec 2004 15:11:26 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org Subject: Re: Partitioned table performance Date: Sun, 5 Dec 2004 15:06:40 -0800 User-Agent: KMail/1.6.2 Cc: "Stacy White" References: <000a01c4da74$84e072e0$0200a8c0@grownups> In-Reply-To: <000a01c4da74$84e072e0$0200a8c0@grownups> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200412051506.41025.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200412/105 X-Sequence-Number: 9480 Stacy, Thanks for the stats! > In some cases we've seen some increased performance in tests by splitting > the table into several smaller tables. =A0Both 'UNION ALL' views, and the > superclass/subclass scheme work well at pruning down the set of rows a > query uses, but they seem to introduce a large performance hit to the time > to process each row (~50% for superclass/subclass, and ~150% for union > views). This seems reasonable, actually, given your test. Really, what you should= be=20 comparing it against is not against selecting from an individual partition,= =20 but selecting from the whole business as one large table. =20 I also suspect that wider rows results in less overhead proportionally; not= e=20 that your test contains *only* the indexed rows. I should soon have a tes= t=20 to prove this, hopefully. However, I would be interested in seeing EXPLAIN ANALYZE from your tests=20 rather than just EXPLAIN. =2D-=20 Josh Berkus Aglio Database Solutions San Francisco