Splitting one big table into smaller ones

Поиск
Список
Период
Сортировка
От Guillaume Perréal
Тема Splitting one big table into smaller ones
Дата
Msg-id 38EDE168.64CA4354@lyon.cemagref.fr
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Frank Bax
Дата:
Сообщение: Re: tricky date manipulations?
Следующее
От: "Sampath, Krishna"
Дата:
Сообщение: Searching www.postgresql.org - TIP