Re: partitioned table query question

From: Robert Treat <robert(at)omniti(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Erik Jones <erik(at)myemma(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mason Hale <masonhale(at)gmail(dot)com>
Subject: Re: partitioned table query question
Date: 2007-12-11 05:14:20
Message-ID: 200712110014.20720.robert@omniti.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Monday 10 December 2007 20:01, Erik Jones wrote:
> Again, though, is there some better way to go about implementing some
> kind of hash based partitioning in postgres besides this that would
> be more natural wrt queries?
>

One way is to set a static bin id for each partition, then do a select with
where bin_id = mod(2112,3); Where 2112 equals the number your looking for,
and 3 would be the number of buckets.

--
Robert Treat
http://www.omniti.com/
We're Big. On PostgreSQL.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2007-12-11 05:32:07 Re: question about warm standby databases in 8.2.5
Previous Message Colin Wetherbee 2007-12-11 05:04:36 Re: SQL design pattern for a delta trigger?

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Saito 2007-12-11 05:55:28 Re: Problem of a server gettext message.
Previous Message Tom Lane 2007-12-11 05:04:29 Re: partitioned table query question