Re: FK triggers misused? - Mailing list pgsql-performance

From Tom Lane
Subject Re: FK triggers misused?
Date
Msg-id 12205.1176767396@sss.pgh.pa.us
Whole thread Raw
In response to Re: FK triggers misused?  (cluster <skrald@amossen.dk>)
List pgsql-performance
cluster <skrald@amossen.dk> writes:
>> So the next question is, what pg version is the original poster using?
>> because 8.1.x doesn't report trigger execution times, and 8.2.x would use
>> a single bitmap index scan with an = ANY condition, not a BitmapOr.

> I have tried 8.1.0 and 8.1.3 for this query.

Checking the code, 8.1.x does report trigger times, so AndrewSN is
mistaken on that point.

However, it's also the case that 8.1 does have the suppress-the-trigger
logic for FKs, and it works fine for me in a simple test.  I'm using
8.1 branch tip, but there are no relevant changes since 8.1.0 as far
as I can see in the CVS logs.

What is that non-FK trigger shown in your results?

>    Trigger posts_tsvectorupdate: time=61.659 calls=5

Could it possibly be firing an extra update on the table?

            regards, tom lane

pgsql-performance by date:

Previous
From: cluster
Date:
Subject: Re: FK triggers misused?
Next
From: Tom Lane
Date:
Subject: Re: FK triggers misused?