pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Michael Fuhr <mike@fuhr.org>
Cc: Martin Lesser <ml-pgsql@bettercom.de>
Cc: pgsql-performance@postgresql.org
Subject: Re: Effects of cascading references in foreign keys
Date: Sat, 29 Oct 2005 09:49:47 -0500
Message-ID: <20051029144947.GB21068@wolff.to> (raw)
In-Reply-To: <20051029142432.GA79557@winnie.fuhr.org>
References: <87acgszihk.fsf@nb-aspire.bettercom.de>
	<20051029142432.GA79557@winnie.fuhr.org>

On Sat, Oct 29, 2005 at 08:24:32 -0600,
  Michael Fuhr <mike@fuhr.org> wrote:
> > Does an UPDATE of e.g. m_fld1 in t_master cause a 'lookup' in all tables
> > which have a cascading update-rule or is this 'lookup' only triggered if
> > the referenced column in t_master is explicitly updated?
> 
> My tests suggest that a lookup on the referring key is done only
> if the referenced key is changed.  Here's an example from 8.1beta4;
> I used this version because EXPLAIN ANALYZE shows triggers and the
> time spent in them, but I see similar performance characteristics
> in earlier versions.  I've intentionally not put an index on the
> referring column to make lookups on it slow.

It looks like this feature was added last May, so I think it only applies
to 8.1.



view thread (17+ messages)  latest in thread

Message-ID: <20051029144947.GB21068@wolff.to>
Permalink:  ../20051029144947.GB21068@wolff.to/
Also on:    postgresql.org/message-id/20051029144947.GB21068@wolff.to

 · 

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: bruno@wolff.to, mike@fuhr.org, ml-pgsql@bettercom.de
  Subject: Re: Effects of cascading references in foreign keys
  In-Reply-To: <20051029144947.GB21068@wolff.to>

* 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