Splitting one big table into smaller ones - Mailing list pgsql-general

From Guillaume Perréal
Subject Splitting one big table into smaller ones
Date
Msg-id 38EDE168.64CA4354@lyon.cemagref.fr
Whole thread Raw
List pgsql-general
I've got a big table of measures like that:

CREATE TABLE measures (
    stationCode varchar(8),
    when datetime,
    value float,
    quality char,
    PRIMARY KEY (stationCode, when)
);

Each station (identified by stationCode) could have up to 10**6 measures. So I
want to split it into smaller tables to increase perfomance :

CREATE TABLE measures<1st stationCode> (
    when datetime,
    value float,
    quality char,
    PRIMARY KEY (when)
);
CREATE TABLE measures<2nd stationCode> (
    ... and so on.

Is there a way to handle that using SQL and PL/pgSQL languages ?

Thanks,

Guillaume Perréal
Stagiaire MIAG
Cemagref - URH
France



pgsql-general by date:

Previous
From: Frank Bax
Date:
Subject: Re: tricky date manipulations?
Next
From: "Sampath, Krishna"
Date:
Subject: Searching www.postgresql.org - TIP