slow UPDATE speed

From: GUO Zhijun <jamguo(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: slow UPDATE speed
Date: 2007-12-03 08:41:23
Message-ID: 1c5268c6-5a23-4c41-884f-837695cc321b@d4g2000prg.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I met a problem that it's slow to update all rows in a table. My
procedures are:

ALTER TABLE user ADD COLUMN foo smallint;
UPDATE user SET foo = 2;
ALTER TABLE user ALTER COLUMN foo SET NOT NULL;
ALTER TABLE user ALTER COLUMN foo SET DEFAULT 2;

The 2nd step took me 2600s. It's a simple table having 0.4M records
and it's running on a test machine, that is, no load at all.
Is there any problem with my settings or any other?

Thank you.

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2007-12-03 08:43:37 Re: HA and Replication - how to choose among all the available solutions
Previous Message Pascal Cohen 2007-12-03 08:16:40 Re: HA and Replication - how to choose among all the available solutions