pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: David Garamond <lists@zara.6.isreserved.com>
To: Manfred Koizar <mkoi-pg@aon.at>
To: pgsql-general@postgresql.org
Subject: Re: how many record versions
Date: Sun, 23 May 2004 23:32:48 +0700
Message-ID: <40B0D230.6030803@zara.6.isreserved.com> (raw)
In-Reply-To: <gpd1b0t6m33cpv0c95o7nqros9rpf5gvk7@email.aon.at>
References: <40AFAD9F.6000104@zara.6.isreserved.com>
<gpd1b0t6m33cpv0c95o7nqros9rpf5gvk7@email.aon.at>
Manfred Koizar wrote:
>>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.
>
> How many rows? I would VACUUM that table after every few hundred
> updates or whenever 10% to 20% of the rows have been updated, whichever
> is greater.
Actually, each record will be incremented probably only thousands of
times a day. But there are many banners. Each record has a (bannerid,
campaignid, websiteid, date, countrycode) "dimensions" and (impression,
click) "measures". The table currently has +- 1,5-2 mil records (it's in
MyISAM MySQL), so I'm not sure if I can use that many sequences which
Tom suggested. Every impression (banner view) and click will result in a
SQL statement (= a "transaction" in MyISAM, since MyISAM doesn't support
BEGIN + COMMIT).
I'm contemplating of moving to Postgres, but am worried with the MVCC
thing. I've previously tried briefly using InnoDB in MySQL but have to
revert back to MyISAM because the load increased significantly.
--
dave
view thread (14+ messages) latest in thread
Message-ID: <40B0D230.6030803@zara.6.isreserved.com> Permalink: ../40B0D230.6030803@zara.6.isreserved.com/ Also on: postgresql.org/message-id/40B0D230.6030803@zara.6.isreserved.com ·
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: lists@zara.6.isreserved.com, mkoi-pg@aon.at Subject: Re: how many record versions In-Reply-To: <40B0D230.6030803@zara.6.isreserved.com> References: <40AFAD9F.6000104@zara.6.isreserved.com> <gpd1b0t6m33cpv0c95o7nqros9rpf5gvk7@email.aon.at> <40B0D230.6030803@zara.6.isreserved.com> * 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