Is full-row updates slower than single-value updates

Поиск
Список
Период
Сортировка
От Björn Lindqvist
Тема Is full-row updates slower than single-value updates
Дата
Msg-id AANLkTikDZ97r22aZDmeqHoF7ST2nAR780JL3EHvVVo66@mail.gmail.com
обсуждение исходный текст
Ответы Re: Is full-row updates slower than single-value updates  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-general
Hello everyone,

My question is like the subject, is it much slower to update all
columns values than just a single column? Generated update queries
from ORM:s generally have the following format:

update foo set a = 1, b = 2, c = 3, .... where id = 1234;

So each column is touched which, I suspect, is much slower than just
updating a single column because more indexes has to be rebuilt and so
on. EXPLAIN ANALYZE does not give any hints and claims that both
queries are equally fast. Maybe someone can guide me to documentation
which explains how to estimate how costly row-level updates are?

--
mvh Björn

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to log query parameters instead of variables with log_min_duration_statement
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: EDB editions