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 E0D9B5398C for ; Wed, 27 Apr 2005 10:31:40 -0300 (ADT) 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 54007-06 for ; Wed, 27 Apr 2005 13:31:38 +0000 (GMT) Received: from zoom.spline.inf.fu-berlin.de (zoom.spline.inf.fu-berlin.de [160.45.117.148]) by svr1.postgresql.org (Postfix) with ESMTP id 565895360E for ; Wed, 27 Apr 2005 10:31:37 -0300 (ADT) Received: by zoom.spline.inf.fu-berlin.de (Postfix, from userid 2091) id D38628C70F; Wed, 27 Apr 2005 15:31:39 +0200 (CEST) Date: Wed, 27 Apr 2005 15:31:39 +0200 From: Yann Michel To: Tom Lane Cc: Stacy White , Alvaro Herrera , PFC , Josh Berkus , pgsql-performance@postgresql.org Subject: Re: What needs to be done for real Partitioning? Message-ID: <20050427133139.GA3700@zoom.spline.inf.fu-berlin.de> References: <200503191202.38089.josh@agliodbs.com> <20050319225624.GA8467@dcc.uchile.cl> <3404.1111277153@sss.pgh.pa.us> <002a01c52d87$543d1010$0200a8c0@grownups> <14172.1111359709@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14172.1111359709@sss.pgh.pa.us> User-Agent: Mutt/1.5.6i 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: 200504/721 X-Sequence-Number: 12118 Hi, On Sun, Mar 20, 2005 at 06:01:49PM -0500, Tom Lane wrote: > Global indexes would seriously reduce the performance of both vacuum and > cluster for a single partition, and if you want seq scans you don't need > an index for that at all. So the above doesn't strike me as a strong > argument for global indexes ... I'd like to describe a usecase where a global index is usefull. We have a datawarehouse with invoices for a rolling window of a few years. Each invoice has several positions so a uk is (invoice,position). Dur to the fact that most of the queries are only on a few months or some quarters of a year, our pk starts with the time-attribute (followed by the dimension ids) which is the partition key (range). During the nightly update, we receive each updated invoice so we have to update that special (global unique) row which is resolved very fast by using the uk. So you can see, that there is a usefull case for providing a global index while using partitining and local indexes as well. Regards, Yann