Re: perfomance question

Поиск
Список
Период
Сортировка
От Adam Ruth
Тема Re: perfomance question
Дата
Msg-id 101F118F-7975-11D8-B40E-000A959D1424@intercation.com
обсуждение исходный текст
Ответ на Re: perfomance question  (sad <sad@bankir.ru>)
Список pgsql-sql
On Mar 18, 2004, at 11:27 PM, sad wrote:

> On Thursday 18 March 2004 21:38, you wrote:
>> Sad,
>>
>>> what are perfomance difference bitween
>>> a)  update t1 set f1 = 'x', f2 = 'y';
>>> b)  update t1 set f1 = 'x', f2 = f2;
>>> c)  update t1 set f1 = 'x';
>>> ?
>>
>> Not a lot.  Why don't you try it?
>
> Really ! why ? :-)
>
> I forgot to ask the second question:
> How these updates affect a data storage ?
> (does (b) cause physical update of f2 ?)

Updates always apply to full rows at a time.  So while "update t1 set 
f1 = 'x'" only changes the value of f1 to 'x', f2 will have a second 
copy with the same value in the new row that is created as part of the 
update.  It's all part of the MVCC architecture.  There may be some 
uncommon exceptions to this rule, but I'm not sure.

Adam Ruth

>
>
>
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>



В списке pgsql-sql по дате отправления:

Предыдущее
От: sad
Дата:
Сообщение: Re: perfomance question
Следующее
От: Martin Marques
Дата:
Сообщение: inverse of "day of year"