Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 096E29FA1A1 for ; Wed, 13 Dec 2006 12:46:47 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 27996-05 for ; Wed, 13 Dec 2006 12:46:33 -0400 (AST) 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 A793E9FA248 for ; Wed, 13 Dec 2006 12:46:39 -0400 (AST) 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 kBDGkPtA008400; Wed, 13 Dec 2006 11:46:25 -0500 (EST) To: Arnaud Lesauvage cc: Ragnar , Jens Schipkowski , pgsql-performance@postgresql.org Subject: Re: Slow update with simple query In-reply-to: <45801A1B.6070200@freesurf.fr> References: <457FDB1E.6040801@freesurf.fr> <457FF0CD.4050606@freesurf.fr> <4580025D.2040903@freesurf.fr> <1166021340.6369.103.camel@localhost.localdomain> <45801A1B.6070200@freesurf.fr> Comments: In-reply-to Arnaud Lesauvage message dated "Wed, 13 Dec 2006 16:19:55 +0100" Date: Wed, 13 Dec 2006 11:46:25 -0500 Message-ID: <8399.1166028385@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/325 X-Sequence-Number: 22381 Arnaud Lesauvage writes: > Indeed, the new query does not perform that well : > "Hash Join (cost=112.75..307504.97 rows=2024869 width=355) (actual time=53.995..246443.811 rows=2020061 loops=1)" > ... > "Total runtime: 2777844.892 ms" > I removed all unnecessary indexes on t1 before running the query (I left the index on uid and the multicolumn index containind the updated field). > I believe the multicolumn-functional-index computation is taking some time here, isn't it ? Given that the plan itself only takes 246 sec, there's *something* associated with row insertion that's eating the other 2500+ seconds. Either index entry computation or constraint checking ... regards, tom lane