Re: Maintaining a counter up-to-date - Mailing list pgsql-sql

From Samuel Tardieu
Subject Re: Maintaining a counter up-to-date
Date
Msg-id 2003-06-02-20-29-28+trackit+sam@rfc1149.net
Whole thread Raw
In response to Re: Maintaining a counter up-to-date  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Maintaining a counter up-to-date
Next
From: Achilleus Mantzios
Date:
Subject: To ListAdms: Is pgsql-sql operating?