I wrote: > ... I also tried variants > of that involving updating two columns of a 6-column table and of a > 10-column table, figuring that those cases might be a bit more > representative of typical usage (see attached scripts).
Argh, I managed to attach the wrong file for the 10-column test case. For the archives' sake, here's the right one. regards, tom lane
drop table if exists tab; create unlogged table tab (a int4, b int4, f3 int, f4 int, f5 text, f6 float8, f7 int, f8 int, f9 int, f10 int); \timing on insert into tab select g, g, g, g, g::text, g, g, g, g, g from generate_series(1, 10000000) g; vacuum tab; explain verbose update tab set b = b, f6 = f6; update tab set b = b, f6 = f6;