pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Thomas F. O'Connell <tfo@sitening.com>
Cc: PgSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: Effects of cascading references in foreign keys
Date: Sun, 30 Oct 2005 09:10:49 -0500 (EST)
Message-ID: <200510301410.j9UEAnj02881@candle.pha.pa.us> (raw)
In-Reply-To: <F7B49CB0-86E6-4744-9D37-3C1EAEDBA15E@sitening.com>

Thomas F. O'Connell wrote:
> > In 8.1 there is a check to see if the foreign key value has changed  
> > and if
> > not a trigger isn't queued. In the currently released versions any  
> > update
> > will fire triggers.
> > The check in comment for trigger.c didn't say if this optimization  
> > applied
> > to both referencing and referenced keys or just one of those.
> > If you need to know more you can look at the code at:
> > http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/
> > for trigger.c.
> 
> It seems like this warrants an item somewhere in the release notes,  
> and I'm not currently seeing it (or a related item) anywhere. Perhaps  
> E.1.3.1 (Performance Improvements)? For some of the more extreme  
> UPDATE scenarios I've seen, this could be a big win.

Hard to say, perhaps:

	Prevent referential integrity triggers from firing if referenced
	columns are not changed by an UPDATE

	Previously, triggers would fire but do nothing.

However, the description seems more complex than it is worth.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (17+ messages)  latest in thread

Message-ID: <200510301410.j9UEAnj02881@candle.pha.pa.us>
Permalink:  ../200510301410.j9UEAnj02881@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200510301410.j9UEAnj02881@candle.pha.pa.us

 · 

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: pgman@candle.pha.pa.us, tfo@sitening.com
  Subject: Re: Effects of cascading references in foreign keys
  In-Reply-To: <200510301410.j9UEAnj02881@candle.pha.pa.us>

* 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