Re: Partitioning an existing table - Mailing list pgsql-general

From Cédric Villemain
Subject Re: Partitioning an existing table
Date
Msg-id BANLkTim2G4DmG1D-EsNqH=fkxAnZ7RUJfA@mail.gmail.com
Whole thread Raw
In response to Partitioning an existing table  (Phoenix Kiula <phoenix.kiula@gmail.com>)
Responses Re: Partitioning an existing table
List pgsql-general
2011/4/25 Phoenix Kiula <phoenix.kiula@gmail.com>:
> Hi.
>
> The partitioning documentation in PG is very clear on how to partition
> a new table. Create child tables, and have triggers that manage
> INSERT, UPDATE and DELETE commands.
>
> How about doing this with existing massive tables? (Over 120 million rows)
>
> I could create a new parent table with child tables, and then INSERT
> all these millions of rows to put them into the right partition. But
> is that recommended?

It will be faster to INSERT directly in the good child tables and you
can make multiple INSERT in parrallel (depend of your IO system and
number of tables)

>
> Thanks
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



--
Cédric Villemain               2ndQuadrant
http://2ndQuadrant.fr/     PostgreSQL : Expertise, Formation et Support

pgsql-general by date:

Previous
From: Phoenix Kiula
Date:
Subject: Partitioning an existing table
Next
From: "David Johnston"
Date:
Subject: Re: Partitioning an existing table