pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: pginfo <pginfo@t1.unisoftbg.com>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Trigger question
Date: Thu, 15 Jan 2004 16:10:38 +0000
Message-ID: <200401151610.38270.dev@archonet.com> (raw)
In-Reply-To: <400691EA.96598C34@t1.unisoftbg.com>
References: <400691EA.96598C34@t1.unisoftbg.com>

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



view thread (15+ messages)  latest in thread

Message-ID: <200401151610.38270.dev@archonet.com>
Permalink:  ../200401151610.38270.dev@archonet.com/
Also on:    postgresql.org/message-id/200401151610.38270.dev@archonet.com

 · 

reply

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-performance@postgresql.org
  Cc: dev@archonet.com, pginfo@t1.unisoftbg.com
  Subject: Re: Trigger question
  In-Reply-To: <200401151610.38270.dev@archonet.com>

* 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