Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WdhFB-0000Sr-R8 for pgsql-performance@arkaria.postgresql.org; Fri, 25 Apr 2014 14:36:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WdhFB-0001Ow-B9 for pgsql-performance@arkaria.postgresql.org; Fri, 25 Apr 2014 14:36:49 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WdhFA-0001Op-4I for pgsql-performance@postgresql.org; Fri, 25 Apr 2014 14:36:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WdhF7-0005vo-NO for pgsql-performance@postgresql.org; Fri, 25 Apr 2014 14:36:47 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s3PEaifV006665; Fri, 25 Apr 2014 10:36:44 -0400 From: Tom Lane To: Jonatan Evald Buus cc: pgsql-performance@postgresql.org Subject: Re: Poor performance for delete query In-reply-to: References: <28604.1398371340@sss.pgh.pa.us> <29874.1398374703@sss.pgh.pa.us> Comments: In-reply-to Jonatan Evald Buus message dated "Fri, 25 Apr 2014 07:04:59 +0200" Date: Fri, 25 Apr 2014 10:36:44 -0400 Message-ID: <6664.1398436604@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Jonatan Evald Buus writes: > On 24 April 2014 23:25, Tom Lane wrote: >> Jonatan Evald Buus writes: >>> Why is "order2transaction_fk" being triggered twice? Is that because >>> there're two affected rows? >> No, I'd have expected a delete of multiple rows to show as calls=N, >> not N separate entries. > This doesn't explain the extra trigger of "order2transaction_fk". > Any guidelines as to how we may investigate this further would be greatly > appreciated. If you could show us your exact database schema, it might become clearer what's happening. I'm wondering about duplicate constraint names for instance ... regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance