Re: Trigger question - Mailing list pgsql-performance

From Richard Huxton
Subject Re: Trigger question
Date
Msg-id 200401151610.38270.dev@archonet.com
Whole thread Raw
In response to Trigger question  (pginfo <pginfo@t1.unisoftbg.com>)
Responses Re: Trigger question  (Evil Azrael <evilazrael@evilazrael.de>)
List pgsql-performance
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?

Not at the moment (and I don't know of any plans for it).

> For example I am able to declare this in oracle.
> My trigger is writen in pgSQL.

Hmm - I can only think of two things you can try:
1. check for the change first thing you do and exit if not there
2. do the same, but write the trigger function in 'C'

--
  Richard Huxton
  Archonet Ltd

pgsql-performance by date:

Previous
From: "Rigmor Ukuhe"
Date:
Subject: Weird query speed
Next
From: Tom Lane
Date:
Subject: Re: Weird query speed