Re: Need suggestion on how best to update 3 million rows

From: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>
To: (Richard Huxton <dev(at)archonet(dot)com>, Ow Mun Heng <Ow(dot)Mun(dot)Heng(at)wdc(dot)com>)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Need suggestion on how best to update 3 million rows
Date: 2007-09-06 13:06:06
Message-ID: 200709061309.l86D9Y6H069952@smtp2.jaring.my
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 06:32 PM 9/6/2007, Richard Huxton wrote:

>Two other tips for bulk-updates like this:
>1. Do as many columns in one go as you can
>2. Only update rows that need updating
>
>When you've finished, a CLUSTER/VACUUM FULL can be useful too.

How about: make sure you have enough free space because the table
will effectively double in size? Assuming it hasn't already been
updated a few times without vacuuming :).

That's still true right?

It is safe to assume that postgresql will still handle the out of
disk space scenario gracefully - no data corruption - the transaction
fails and that's it?

Regards,
Link.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message gunce orman 2007-09-06 13:18:19 foreign key violation error with partitioned table
Previous Message Alvaro Herrera 2007-09-06 12:57:43 Re: Controlling locale and impact on LIKE statements