pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Garamond <lists@zara.6.isreserved.com>
Cc: pgsql-general@postgresql.org
Subject: Re: how many record versions
Date: Sun, 23 May 2004 11:54:48 -0400
Message-ID: <24219.1085327688@sss.pgh.pa.us> (raw)
In-Reply-To: <40AFAD9F.6000104@zara.6.isreserved.com>
References: <40AFAD9F.6000104@zara.6.isreserved.com>

David Garamond <lists@zara.6.isreserved.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



view thread (14+ messages)  latest in thread

Message-ID: <24219.1085327688@sss.pgh.pa.us>
Permalink:  ../24219.1085327688@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24219.1085327688@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, lists@zara.6.isreserved.com
  Subject: Re: how many record versions
  In-Reply-To: <24219.1085327688@sss.pgh.pa.us>
  References: <40AFAD9F.6000104@zara.6.isreserved.com> <24219.1085327688@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox