From: | "Rocco Altier" <RoccoA(at)Routescape(dot)com> |
---|---|
To: | "Hannu Krosing" <hannu(at)skype(dot)net>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: TODO Request |
Date: | 2006-09-05 15:49:38 |
Message-ID: | 6E0907A94904D94B99D7F387E08C4F57016D1596@FALCON.INSIGHT |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Hannu Krosing
>
> Ühel kenal päeval, T, 2006-08-29 kell 22:12, kirjutas Joshua D. Drake:
> > >> Auto creations of partitions
> >
> > This would be something like:
> >
> > create table foo () partition by ...
>
> from the referenced MySQL manual entry
>
> CREATE TABLE members (
> ...
> joined DATE NOT NULL
> )
> PARTITION BY KEY(joined)
> PARTITIONS 6;
>
> Do you have any idea how this should work ?
>
> What date range should go into which partition ?
>
Since we don't have any knowledge about the date ranges in question, and the fact that they could change over time, I think the only stable way to handle this scenario would be to use a hash function which had 6 buckets (something like 'date % 6' could work).
I do see an issue, if someone wanted to change the number of partitions in use, since it would have to rehash the table, and move data around.
I don't see any other way to handle this, but I might not be thinking hard enough.
-rocco
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-09-05 15:52:16 | Re: Ding-dong, contrib is dead ... |
Previous Message | Andrew Dunstan | 2006-09-05 15:21:43 | Re: Ding-dong, contrib is dead ... |