Re: Correct Concept On Table Partition

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Correct Concept On Table Partition
Дата
Msg-id 20100126123054.GD16544@a-kretschmer.de
обсуждение исходный текст
Ответ на Correct Concept On Table Partition  (Yan Cheng Cheok <yccheok@yahoo.com>)
Список pgsql-general
In response to Yan Cheng Cheok :
> Currently, I plan to use table partition to solve the following problem.
> I have a table which is going to grow to a very huge row, as time goes on.
> As I know, as table grow larger, the read operation will be slower.
>
> Hence, I decide to use table partition, in order to improve read speed.
> ...
>
> First 1st millions rows will be write to measurement_1, 2nd millions into measurement_2, ....
>
>
> Is this the correct expectation, on table partition?

Depends on your selects. You needs an attribute to decide which
child-table contains your data.

For instance, create tables for every month. Now you can 'select ...
where date >= '2010-01-01'::date and date < '2010-02-01'::date to select
all data for this particular month.

Your child-tables should contains contraints to enforce this
partitioning-schema.

There are a lot of examples in the internet how to do that, for instance:
http://www.if-not-true-then-false.com/2009/11/howto-create-postgresql-table-partitioning-part-1/


Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Primary Key Increment Doesn't Seem Correct Under Table Partition
Следующее
От: S Arvind
Дата:
Сообщение: Postgres Host