Re: Adding and filling new column on big table - Mailing list pgsql-performance

From Francisco Reyes
Subject Re: Adding and filling new column on big table
Date
Msg-id cone.1149004718.536638.48418.1000@zoraida.natserv.net
Whole thread Raw
In response to Re: Adding and filling new column on big table  ("Jonathan Blitz" <jb@anykey.co.il>)
Responses Re: Adding and filling new column on big table
List pgsql-performance
Jonathan Blitz writes:

> I just gave up in the end and left it with NULL as the default value.


Could you do the updates in batches instead of trying to do them all at
once?

Have you done a vacuum full on this table ever?

> There were, in fact, over 2 million rows in the table rather than 1/4 of a
> million so that was part of the problem.

What hardware?
I have a dual CPU opteron with 4GB of RAM and 8 disks in RAID 10 (SATA).
Doing an update on a 5 million record table took quite a while, but it did
fininish. :-)

I just did vacuum full before and after though.. That many updates tend to
slow down operations on the table aftewards unless you vacuum the table.
Based on what you wrote it sounded as if you tried a few times and may have
killed the process.. this would certainly slow down the operations on that
table unless you did a vacuum full.

I wonder if running vacuum analyze against the table as the updates are
running would be of any help.


pgsql-performance by date:

Previous
From: "mcelroy, tim"
Date:
Subject: Re: pg_dump issue
Next
From: "Jonathan Blitz"
Date:
Subject: Re: Adding and filling new column on big table