From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org> |
Cc: | Martin Lesser <ml-pgsql(at)bettercom(dot)de>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Effects of cascading references in foreign keys |
Date: | 2005-10-29 14:49:47 |
Message-ID: | 20051029144947.GB21068@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Sat, Oct 29, 2005 at 08:24:32 -0600,
Michael Fuhr <mike(at)fuhr(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-10-29 16:05:27 | Re: Effects of cascading references in foreign keys |
Previous Message | Bruno Wolff III | 2005-10-29 14:48:35 | Re: Effects of cascading references in foreign keys |