Re: best practice for moving millions of rows to child table when setting up partitioning? - Mailing list pgsql-admin

From Mark Stosberg
Subject Re: best practice for moving millions of rows to child table when setting up partitioning?
Date
Msg-id ip9r5i$3c2$1@dough.gmane.org
Whole thread Raw
In response to Re: best practice for moving millions of rows to child table when setting up partitioning?  (Raghavendra <raghavendra.rao@enterprisedb.com>)
Responses Re: Re: best practice for moving millions of rows to child table when setting up partitioning?
List pgsql-admin
> Similar posting on partition table, take this inputs before going
> forward with partition table.
>
> http://archives.postgresql.org/pgsql-general/2011-04/msg00808.php
>
> Best solution given by Greg Smith as well Vick.

Thanks for the replies.

Today I reviewed the section on partitioning from Greg's High
Performance book.

I tried out the method of using an "update trigger" on the parent table
to move rows child tables.

In particular, I wanted to check whether the UPDATE statement would
alter all the rows automatically, or if the underlying trigger would
cause all the rows processed a row at a time.

It appears from my test that the result of the UPDATE was going to
appear all at once. I'm worried about the resource implications of
inserting mullions of rows all at once.

Someone else suggested writing a small program to insert the rows in s
smaller chunks. I think that's the approach I'm going to consider taking.

Thanks for the input!

   Mark

pgsql-admin by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Starting psql without a database?
Next
From: Bob Lunney
Date:
Subject: Re: best practice for moving millions of rows to child table when setting up partitioning?