From: | Yan Cheng Cheok <yccheok(at)yahoo(dot)com> |
---|---|
To: | Vick Khera <vivek(at)khera(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Partitioning on Table with Foreign Key |
Date: | 2010-01-21 15:31:34 |
Message-ID: | 645870.17439.qm@web65704.mail.ac4.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Make sense to me. Thanks for the advice. I will try that out.
Thanks and Regards
Yan Cheng CHEOK
--- On Thu, 1/21/10, Vick Khera <vivek(at)khera(dot)org> wrote:
> From: Vick Khera <vivek(at)khera(dot)org>
> Subject: Re: [GENERAL] Partitioning on Table with Foreign Key
> To: "Yan Cheng Cheok" <yccheok(at)yahoo(dot)com>
> Cc: pgsql-general(at)postgresql(dot)org
> Date: Thursday, January 21, 2010, 11:30 PM
> On Thu, Jan 21, 2010 at 3:46 AM, Yan
> Cheng Cheok <yccheok(at)yahoo(dot)com>
> wrote:
> > table measurement will have a *lot* of row (millions).
> I want to speed up write and read access. Hence, I use
> partition technique.
> >
> > CREATE TABLE measurement_y2006m02 (
> > CHECK ( date >= DATE '2006-02-01' AND date
> < DATE '2006-03-01' )
> > ) INHERITS (measurement);
> >
> > Opps! But measurement do not have date column. How I
> can refer to measurement's lot's date?
> >
>
> Split on your lot ID number instead of date, using a modulo
> operation.
> I've done this by splitting a table 100 ways using the
> constraing (id
> % 100 == N) for N = 0 .. 99.
>
> We don't know what your data retention or distribution
> needs are, so
> it is hard to offer solid advice.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Fernando Schapachnik | 2010-01-21 15:57:01 | Changing FS when full |
Previous Message | Vick Khera | 2010-01-21 15:30:00 | Re: Partitioning on Table with Foreign Key |