Is full-row updates slower than single-value updates - Mailing list pgsql-general

From Björn Lindqvist
Subject Is full-row updates slower than single-value updates
Date
Msg-id AANLkTikDZ97r22aZDmeqHoF7ST2nAR780JL3EHvVVo66@mail.gmail.com
Whole thread Raw
Responses Re: Is full-row updates slower than single-value updates  (Pavel Stehule <pavel.stehule@gmail.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to log query parameters instead of variables with log_min_duration_statement
Next
From: Steve Crawford
Date:
Subject: Re: EDB editions