Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id AE99F9FB52D for ; Mon, 16 Apr 2007 20:50:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 36618-10 for ; Mon, 16 Apr 2007 20:50:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 205D69FB45E for ; Mon, 16 Apr 2007 20:49:58 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l3GNnuLT012206; Mon, 16 Apr 2007 19:49:56 -0400 (EDT) To: cluster cc: pgsql-performance@postgresql.org Subject: Re: FK triggers misused? In-reply-to: References: <26399.1176614941@sss.pgh.pa.us> <102.1176650563@sss.pgh.pa.us> Comments: In-reply-to cluster message dated "Tue, 17 Apr 2007 01:12:28 +0200" Date: Mon, 16 Apr 2007 19:49:56 -0400 Message-ID: <12205.1176767396@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/320 X-Sequence-Number: 24197 cluster 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