Re: Trigger question

From: Evil Azrael <evilazrael(at)evilazrael(dot)de>
To:
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Trigger question
Date: 2004-01-15 17:08:11
Message-ID: 1022542776.20040115180811@evilazrael.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)evilazrael(dot)de

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Syd 2004-01-15 21:17:32 Re: insert speed - Mac OSX vs Redhat
Previous Message Tom Lane 2004-01-15 16:40:46 Re: Weird query speed