Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8CB2A9FC20F for ; Wed, 24 Oct 2007 11:28:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 85108-06 for ; Wed, 24 Oct 2007 11:27:25 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.227]) by postgresql.org (Postfix) with ESMTP id 085559F9F7E for ; Wed, 24 Oct 2007 11:26:07 -0300 (ADT) Received: by nz-out-0506.google.com with SMTP id l8so180975nzf for ; Wed, 24 Oct 2007 07:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=bk0dMpJZ3Pt0VsIU4D1RzzctaimxnC2Ke+hZ6rUEPts=; b=MdOv5u88m2oVIZVpd/vVFTGYZa5BeEdbSfczkJYmSXxgxN3TbjUgwr9NUeOKhbyFohVyt+81m08y8Gh5BTIM/RvO9sSX7XE0vwZPWLozXeAQK25OM9xvKSDM34h0uJGPwfQUalcXoCLzUnzu9HMbSD1ODU8gBMvD7QqPTSiK0bc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PlsSBv66y+u1hBwoWXQeHf2yp7iU50vYdHI2qqRHv8V52vkBMoviEPQ0P33gxidvYf6Uk0LxsRfrtDm9+boACVKLNXNgFEtmGIH9NAxmjisGLMF8KzIRIFZ8wVH2HFmb3ZE45jhPWna+hBgX0cqIXKCazd+seqZMvDTXFCpgCcQ= Received: by 10.142.84.3 with SMTP id h3mr129481wfb.1193235953871; Wed, 24 Oct 2007 07:25:53 -0700 (PDT) Received: by 10.142.203.6 with HTTP; Wed, 24 Oct 2007 07:25:53 -0700 (PDT) Message-ID: Date: Wed, 24 Oct 2007 16:25:53 +0200 From: "Giulio Cesare Solaroli" To: "Tom Lane" Subject: Re: Finalizing commit taking very long Cc: pgsql-performance@postgresql.org In-Reply-To: <2051.1193234616@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1302.1193231756@sss.pgh.pa.us> <2051.1193234616@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/275 X-Sequence-Number: 27297 On 10/24/07, Tom Lane wrote: > "Giulio Cesare Solaroli" writes: > > How can I try to isolate the trigger taking so long, in oder to > > understand which is/are the missing index(es)? > > Try SET CONSTRAINTS ALL IMMEDIATE and then EXPLAIN ANALYZE the > delete. This should cause all the triggers to run within the > scope of the EXPLAIN ANALYZE, and you'll be able to see which > one(s) are slow. (This assumes you're running a recent release > of PG; I think EXPLAIN shows trigger times since 8.1 or so.) I was thinking about something similar after writing the last message. Thank you very much for your attention!! Giulio Cesare