Re: 7.3.4 on Linux: UPDATE .. foo=foo+1 degrades massivly over time

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Philipp Buehler <pb-pgsql-g(at)mlsub(dot)buehler(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: 7.3.4 on Linux: UPDATE .. foo=foo+1 degrades massivly over time
Date: 2004-04-21 18:18:54
Message-ID: 20040421181854.GD30712@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 21, 2004 at 19:52:15 +0200,
Philipp Buehler <pb-pgsql-g(at)mlsub(dot)buehler(dot)net> wrote:
>
> While running
> UPDATE banner SET counterhalf=counterhalf+1 WHERE BannerID=50
> several thousand times, the return times degrade (somewhat linear).

This is to be expected. Postgres uses MVCC and everytime you do an update
a new row is created.

> A following VACCUM brings back return times to 'start' - but I cannot
> run VACUUM any other minute (?). And it exactly vaccums as many tuples
> as I updated.. sure thing:

Why not? You only have to vacuum this one table. Vacuuming it once a minute
should be doable.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2004-04-21 18:25:19 Re: Redundancy software for PostgreSQL
Previous Message Mike Nolan 2004-04-21 18:17:26 Re: PL/SQL question