From: | "Thomas F(dot) O'Connell" <tfo(at)sitening(dot)com> |
---|---|
To: | PgSQL Performance <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Effects of cascading references in foreign keys |
Date: | 2005-10-30 04:32:21 |
Message-ID: | F7B49CB0-86E6-4744-9D37-3C1EAEDBA15E@sitening.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Oct 29, 2005, at 9:48 AM, Bruno Wolff III wrote:
> On Sat, Oct 29, 2005 at 13:10:31 +0200,
> Martin Lesser <ml-pgsql(at)bettercom(dot)de> wrote:
>
>> Which effects have UPDATEs on REFERENCEd TABLEs when only columns
>> in the
>> referenced table are updated which are not part of the FOREIGN KEY
>> constraint?
>
> 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.
--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC
Open Source Solutions. Optimized Web Development.
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-469-5150
615-469-5151 (fax)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-10-30 14:10:49 | Re: Effects of cascading references in foreign keys |
Previous Message | Tom Lane | 2005-10-29 18:35:25 | Re: Effects of cascading references in foreign keys |