Re: pessimal trivial-update performance
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2010-07-04T04:11:19Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > CREATE OR REPLACE FUNCTION update_tab() RETURNS void AS $$ > BEGIN > INSERT INTO tab VALUES (0); > FOR i IN 1..100000 LOOP > UPDATE tab SET x = x + 1; > END LOOP; > END > $$ LANGUAGE plpgsql; I believe that none of the dead row versions can be vacuumed during this test. So yes, it sucks, but is it representative of real-world cases? regards, tom lane