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.