pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <decibel@decibel.org>
To: Josh Berkus <josh@agliodbs.com>
Cc: Stacy White <harsh@computer.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Alvaro Herrera <alvherre@dcc.uchile.cl>
Cc: PFC <lists@boutiquenumerique.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: What needs to be done for real Partitioning?
Date: Mon, 21 Mar 2005 16:07:45 -0600
Message-ID: <20050321220745.GS51784@decibel.org> (raw)
In-Reply-To: <200503210955.03083.josh@agliodbs.com>
References: <200503191202.38089.josh@agliodbs.com>
	<871xa9fyn4.fsf@stark.xeocode.com>
	<007401c52dd8$73395450$0200a8c0@grownups>
	<200503210955.03083.josh@agliodbs.com>

On Mon, Mar 21, 2005 at 09:55:03AM -0800, Josh Berkus wrote:
> Stacy,
> 
> > Luckily they that had the chance to work with a truly fantastic DBA (the
> > author of an Oracle Press performance tuning book even) before they could
> > switch back.  He convinced them to make some of their indexes global.
> > Performance dramatically improved (compared with both the unpartitioned
> > schema, and the partitioned-and-locally-indexed schema), and they've since
> > stayed with partitioned tables and a mix of local and global indexes.
> 
> Hmmm.  Wouldn't Greg's suggestion of a bitmap index which holds information on 
> what values are found in what partition also solve this?    Without 1/2 of 
> the overhead imposed by global indexes?
> 
> I can actually see such a bitmap as being universally useful to the 
> partitioning concept ... for one, it would resolve the whole "partition on 
> {value}" issue.

I suspect both will have their uses. I've read quite a bit about global
v. local indexs in Oracle, and there are definately cases where global
is much better than local. Granted, there's some things with how Oracle
handles their catalog, etc. that might make local indexes more expensive
for them than they would be for PostgreSQL. It's also not clear how much
a 'partition bitmap' index would help.

As for the 'seqscan individual partitions' argument, that's not going to
work well at all for a case where you need to hit a relatively small
percentage of rows in a relatively large number of partitions. SELECT
... WHERE customer_id = 1 would be a good example of such a query
(assuming the table is partitioned on something like invoice_date).
-- 
Jim C. Nasby, Database Consultant               decibel@decibel.org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"



view thread (45+ messages)  latest in thread

Message-ID: <20050321220745.GS51784@decibel.org>
Permalink:  ../20050321220745.GS51784@decibel.org/
Also on:    postgresql.org/message-id/20050321220745.GS51784@decibel.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: decibel@decibel.org, josh@agliodbs.com, harsh@computer.org, tgl@sss.pgh.pa.us, gsstark@mit.edu, alvherre@dcc.uchile.cl, lists@boutiquenumerique.com
  Subject: Re: What needs to be done for real Partitioning?
  In-Reply-To: <20050321220745.GS51784@decibel.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox