From: Mark Stosberg <mark@summersault.com>
To: pgsql-admin@postgresql.org
Subject: Re: best practice for moving millions of rows to child table when setting up partitioning?
Date: Wed, 27 Apr 2011 15:35:14 -0400
Message-ID: <ip9r5i$3c2$1@dough.gmane.org> (raw)
In-Reply-To: <BANLkTinnJqqJzB8wRi6KkLqhhGQwkyYcrw@mail.gmail.com>
References: <ip9abr$nk8$1@dough.gmane.org>
<BANLkTinnJqqJzB8wRi6KkLqhhGQwkyYcrw@mail.gmail.com>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: mark@summersault.com
Subject: Re: best practice for moving millions of rows to child table when setting up partitioning?
In-Reply-To: <ip9r5i$3c2$1@dough.gmane.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox