Re: how many record versions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how many record versions
Date: 2004-05-23 15:54:48
Message-ID: 24219.1085327688@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com> writes:
> begin;
> update t set val=val+1; -- 1000 times
> commit;

> How many record versions does it create? 1 or 1000?

1000.

> I'm implementing a
> banner counter which is incremented at least 2-3 millions a day. I
> thought I'd cheat by only commiting after every few minutes. Would that
> work or would I still create as many record versions?

Won't make a difference. You should think seriously about using a
sequence rather than an ordinary table for this.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Garamond 2004-05-23 16:32:48 Re: how many record versions
Previous Message Bruno Wolff III 2004-05-23 15:52:37 Re: how many record versions