Skip site navigation (1) Skip section navigation (2)

Re: Table Clustering & Time Range Queries

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Kevin Buckham <kbuckham(at)applocation(dot)net>
Cc: Scott Carey <scott(at)richrelevance(dot)com>,"pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Table Clustering & Time Range Queries
Date: 2009-10-23 22:55:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
* Kevin Buckham (kbuckham(at)applocation(dot)net) wrote:
> I came across links to pg_reorg previously but it seemed that the
> project was a bit "dead".  There is active development but not much
> information, and not much in the way of discussions. I will definitely
> be testing both partitioning and pg_reorg.  I am curious to see if
> pg_reorg will be stable enough for us to use or not.
> Thanks to everyone who provided answers for great and quick responses!
> Wow, it makes me really want to keep Postgres around. :)

I've been following this but havn't commented since it seemed well in
hand.  A few specific things I would mention:

Be sure to read:

I'd recommend partitioning using inheiritance.
Make sure to set constraint_exclusion = on unless you're using 8.4
(in 8.4, constraint_exclusion is tri-state: 'partition', where it will
be used when UNION ALL or inheiritance is used in queries, 'on' where it
will try to be used for all queries, and 'off' where it won't be used at
all; 8.4's default is 'partition').
You may want to consider upgrading to 8.4 if you're not on it already.
You probably want to use triggers on your 'input' table to handle
incoming traffic.
Decide on a sensible partitioning scheme and then test, test, test.
Make sure it does what you want.  explain analyze and all that.



In response to

pgsql-performance by date

Next:From: Jesper KroghDate: 2009-10-24 04:06:11
Subject: Re: Full text search - query plan? PG 8.4.1
Previous:From: Scott MarloweDate: 2009-10-23 22:08:44
Subject: Re: Full text search - query plan? PG 8.4.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group