Re: About updates - Mailing list pgsql-general

From Emi Lu
Subject Re: About updates
Date
Msg-id 4411A5B7.40500@encs.concordia.ca
Whole thread Raw
In response to Re: About updates  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-general
Thanks Andreas. That was a quick response.
So way 1 must be quicker.



>am  10.03.2006, um 10:46:39 -0500 mailte Emi Lu folgendes:
>
>
>>Hello,
>>
>>postgresql 8.0.1, in a plpgsql function
>>
>>To update columns' values in a table (without OID), if I ran:
>>1. "update table1 set col1 = ..., col2 = ... ... col100 ="
>>
>>or
>>2.
>>"update table1 set col1 = "
>>...
>>"update table1 set col100 = "
>>
>>way 1 only has one disk I/O, right? While way 2 is more time consuming
>>since there is disk I/O when a update is ran.
>>
>>
>
>Because of MVCC every UPDATE is practical a DELETE + INSERT.
>Way1: you have only one DELETE+INSERT, Way2 one hundred, and you have
>100 dead rows until the next VACUUM.
>
>
>HTH, Andreas
>
>


pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: About updates
Next
From: "Tomi NA"
Date:
Subject: programatic database dump