Re: Trigger question - Mailing list pgsql-performance

From Evil Azrael
Subject Re: Trigger question
Date
Msg-id 1022542776.20040115180811@evilazrael.de
Whole thread Raw
In response to Re: Trigger question  (Richard Huxton <dev@archonet.com>)
List pgsql-performance
Guten Tag Richard Huxton,

Am Donnerstag, 15. Januar 2004 um 17:10 schrieben Sie:

RH> On Thursday 15 January 2004 13:13, pginfo wrote:
>> Hi,
>>
>> I am using pg 7.4.1 and have created a trigger over table with 3 M rows.
>> If I start masive update on this table, pg executes this trigger on
>> every row and dramaticaly slows the system.
>> Exists in pg any way to define the trigger execution only if I have
>> changes on some fields?

That not, but perhaps a STATEMENT Level Trigger could help. It´s a new
feature in 7.4.x and rather undocumented. http://www.postgresql.org/docs/current/interactive/sql-createtrigger.html
"FOR EACH STATEMENT" probably this can help you a bit.

Christoph Nelles



--
Mit freundlichen Grüssen
Evil Azrael                            mailto:evilazrael@evilazrael.de


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Weird query speed
Next
From: Syd
Date:
Subject: Re: insert speed - Mac OSX vs Redhat