From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Correct Concept On Table Partition |
Date: | 2010-01-26 12:30:54 |
Message-ID: | 20100126123054.GD16544@a-kretschmer.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | S Arvind | 2010-01-26 13:01:59 | Postgres Host |
Previous Message | Alban Hertroys | 2010-01-26 10:36:07 | Re: Primary Key Increment Doesn't Seem Correct Under Table Partition |