pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@dcc.uchile.cl>
Cc: PFC <lists@boutiquenumerique.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: What needs to be done for real Partitioning?
Date: Mon, 21 Mar 2005 18:07:25 +0200
Message-ID: <1111421245.4675.8.camel@fuji.krosing.net> (raw)
In-Reply-To: <4507.1111294073@sss.pgh.pa.us>
References: <200503191202.38089.josh@agliodbs.com>
	<op.snwojdwith1vuj@localhost>
	<20050319225624.GA8467@dcc.uchile.cl>
	<3404.1111277153@sss.pgh.pa.us>
	<20050320042917.GA25831@dcc.uchile.cl>
	<4507.1111294073@sss.pgh.pa.us>

On L, 2005-03-19 at 23:47 -0500, Tom Lane wrote:
> Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> > Hmm.  You are right, but without that we won't be able to enforce
> > uniqueness on the partitioned table (we could only enforce it on each
> > partition, which would mean we can't partition on anything else than
> > primary keys if the tables have one).  IMHO this is something to
> > consider.
> 
> Well, partitioning on the primary key would be Good Enough for 95% or
> 99% of the real problems out there.  I'm not excited about adding a
> large chunk of complexity to cover another few percent.

That automatically means that partitioning expression has to be a range
over PK. (you dont want to have every tuple in separate tabel :)

And it also means that you have to automatically create new partitions.

Are you sure that partitioning on anything else than PK would be
significantly harder ?

I have a case where I do manual partitioning over start_time
(timestamp), but the PK is an id from a sequence. They are almost, but
not exactly in the same order. And I don't think that moving the PK to
be (start_time, id) just because of "partitioning on PK only" would be a
good design in any way.

So please don't design the system to partition on PK only.

-- 
Hannu Krosing <hannu@tm.ee>



view thread (45+ messages)  latest in thread

Message-ID: <1111421245.4675.8.camel@fuji.krosing.net>
Permalink:  ../1111421245.4675.8.camel@fuji.krosing.net/
Also on:    postgresql.org/message-id/1111421245.4675.8.camel@fuji.krosing.net

 · 

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: hannu@tm.ee, tgl@sss.pgh.pa.us, alvherre@dcc.uchile.cl, lists@boutiquenumerique.com, josh@agliodbs.com
  Subject: Re: What needs to be done for real Partitioning?
  In-Reply-To: <1111421245.4675.8.camel@fuji.krosing.net>

* 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