pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Evil Azrael <evilazrael@evilazrael.de>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Trigger question
Date: Thu, 15 Jan 2004 18:08:11 +0100
Message-ID: <1022542776.20040115180811@evilazrael.de> (raw)
In-Reply-To: <200401151610.38270.dev@archonet.com>
References: <400691EA.96598C34@t1.unisoftbg.com>
	<200401151610.38270.dev@archonet.com>

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




view thread (15+ messages)  latest in thread

Message-ID: <1022542776.20040115180811@evilazrael.de>
Permalink:  ../1022542776.20040115180811@evilazrael.de/
Also on:    postgresql.org/message-id/1022542776.20040115180811@evilazrael.de

 · 

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: evilazrael@evilazrael.de
  Subject: Re: Trigger question
  In-Reply-To: <1022542776.20040115180811@evilazrael.de>

* 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