Re: What needs to be done for real Partitioning? - Mailing list pgsql-performance

From Yann Michel
Subject Re: What needs to be done for real Partitioning?
Date
Msg-id 20050427133139.GA3700@zoom.spline.inf.fu-berlin.de
Whole thread Raw
In response to Re: What needs to be done for real Partitioning?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [HACKERS] Bad n_distinct estimation; hacks suggested?
Next
From: "Joel Fradkin"
Date:
Subject: Final decision