From: Samuel Tardieu <sam@rfc1149.net>
To: Richard Huxton <dev@archonet.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Maintaining a counter up-to-date
Date: Mon, 2 Jun 2003 20:29:28 +0200
Message-ID: <2003-06-02-20-29-28+trackit+sam@rfc1149.net> (raw)
In-Reply-To: <200306021927.58636.dev@archonet.com>
References: <871xyc5vmw.fsf@inf.enst.fr>
<200306021927.58636.dev@archonet.com>
On 2/06, Richard Huxton wrote:
| You want to use triggers not rules here (see the "server programming" and
| "procedural language" manual sections). A trigger will be fired for each row
| inserted/deleted/updated. Of course this means it will be fired 5000 times
| for 5000 updated rows.
Ouch. At the current time, I reverted to count(*) style which seems to be
performed in much less time in 7.3.2 than in 7.2.x.
I'll look at the triggers, thanks.
Sam
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sam@rfc1149.net, dev@archonet.com
Subject: Re: Maintaining a counter up-to-date
In-Reply-To: <2003-06-02-20-29-28+trackit+sam@rfc1149.net>
* 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