Splitting one big table into smaller ones

From: Guillaume Perréal <perreal(at)lyon(dot)cemagref(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: Splitting one big table into smaller ones
Date: 2000-04-07 13:23:52
Message-ID: 38EDE168.64CA4354@lyon.cemagref.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sampath, Krishna 2000-04-07 14:48:33 Searching www.postgresql.org - TIP
Previous Message Frank Bax 2000-04-07 01:29:19 Re: tricky date manipulations?