Re: Partitioning on Table with Foreign Key

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: Partitioning on Table with Foreign Key
Дата
Msg-id 2968dfd61001210730n32073b1cld8e3a496ec2a8ae3@mail.gmail.com
обсуждение исходный текст
Ответ на Partitioning on Table with Foreign Key  (Yan Cheng Cheok <yccheok@yahoo.com>)
Список pgsql-general
On Thu, Jan 21, 2010 at 3:46 AM, Yan Cheng Cheok <yccheok@yahoo.com> wrote:
> table measurement will have a *lot* of row (millions). I want to speed up write and read access. Hence, I use
partitiontechnique. 
>
> 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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Yan Cheng Cheok
Дата:
Сообщение: Re: Partitioning on Table with Foreign Key
Следующее
От: Florian Weimer
Дата:
Сообщение: \dt+ sizes don't include TOAST data