Re: Effects of cascading references in foreign keys - Mailing list pgsql-performance

From Bruno Wolff III
Subject Re: Effects of cascading references in foreign keys
Date
Msg-id 20051029144947.GB21068@wolff.to
Whole thread Raw
In response to Re: Effects of cascading references in foreign keys  (Michael Fuhr <mike@fuhr.org>)
Responses Re: Effects of cascading references in foreign keys
List pgsql-performance
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.

pgsql-performance by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Effects of cascading references in foreign keys
Next
From: Michael Fuhr
Date:
Subject: Re: Effects of cascading references in foreign keys