Re: Efficient recursion - Mailing list pgsql-performance

From Tom Lane
Subject Re: Efficient recursion
Date
Msg-id 14801.1179598355@sss.pgh.pa.us
Whole thread Raw
In response to Efficient recursion  (C Storm <christian.storm@gmail.com>)
List pgsql-performance
C Storm <christian.storm@gmail.com> writes:
> Essentially, I'm looking for the most efficient way to break a
> database into two 'shards' based on a top level table's
> primary key.  For example, split a sales database into two using a
> territory.

I think what you are looking for here is partitioning, not recursion.
PG's support for partitioned tables is a bit crude, but usable:
http://www.postgresql.org/docs/8.2/static/ddl-partitioning.html

            regards, tom lane

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: any way to get rid of Bitmap Heap Scan recheck?
Next
From: Guido Neitzer
Date:
Subject: Re: performance drop on 8.2.4, reverting to 8.1.4