Re: Rewritten rows on unchanged values

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rewritten rows on unchanged values
Дата
Msg-id 3803.1363960514@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Rewritten rows on unchanged values  (Ryan Kelly <rpkelly22@gmail.com>)
Ответы Re: Rewritten rows on unchanged values
Список pgsql-general
Ryan Kelly <rpkelly22@gmail.com> writes:
> I'm having trouble understanding why it is necessary to generate a new
> tuple even when nothing has changed. It seems that the OP understands
> that MVCC is at work, but is questioning why this exact behavior occurs.
> I too have the same question.

It's not *necessary* to do so.  However, avoiding it would require
sitting there and comparing the old and new tuples, which would be a
waste of cycles for most applications, which don't do useless updates.
We'd be trading off a small loss on every update for a moderate gain
on a few updates, with all of the benefit going to poorly-coded
applications.  This has come up before and we've always judged that
it would be a net loss not gain of performance to check for useless
updates.

            regards, tom lane


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

Предыдущее
От: Ryan Kelly
Дата:
Сообщение: Re: Rewritten rows on unchanged values
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Rewritten rows on unchanged values