Re: best practice for moving millions of rows to child table when setting up partitioning?

From: Mark Stosberg <mark(at)summersault(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: best practice for moving millions of rows to child table when setting up partitioning?
Date: 2011-04-27 19:35:14
Message-ID: ip9r5i$3c2$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bob Lunney 2011-04-27 19:37:48 Re: best practice for moving millions of rows to child table when setting up partitioning?
Previous Message Kevin Grittner 2011-04-27 18:51:10 Re: Starting psql without a database?