Re: pessimal trivial-update performance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pessimal trivial-update performance
Date
Msg-id 26947.1278216679@sss.pgh.pa.us
Whole thread Raw
In response to pessimal trivial-update performance  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pessimal trivial-update performance
Re: pessimal trivial-update performance
Re: pessimal trivial-update performance
List 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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: pessimal trivial-update performance
Next
From: Robert Haas
Date:
Subject: Re: pessimal trivial-update performance