Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 3C02D9FA0EF for ; Thu, 14 Dec 2006 12:19:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 26050-05 for ; Thu, 14 Dec 2006 12:19:20 -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 66FBF9FA1A1 for ; Thu, 14 Dec 2006 12:19:20 -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 kBEGJ07x021234; Thu, 14 Dec 2006 11:19:01 -0500 (EST) To: Arnaud Lesauvage cc: Ragnar , Jens Schipkowski , pgsql-performance@postgresql.org Subject: Re: Slow update with simple query In-reply-to: <45816C54.5010602@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> <8399.1166028385@sss.pgh.pa.us> <4581593E.8080401@freesurf.fr> <20426.1166109494@sss.pgh.pa.us> <45816C54.5010602@freesurf.fr> Comments: In-reply-to Arnaud Lesauvage message dated "Thu, 14 Dec 2006 16:23:00 +0100" Date: Thu, 14 Dec 2006 11:19:00 -0500 Message-ID: <21233.1166113140@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/373 X-Sequence-Number: 22429 Arnaud Lesauvage writes: > Tom Lane a écrit : >> It seems the time must be going into this trigger function. What >> does it do? > A lot of things ! Indeed, if it runs it will very badly hurt performances (table > lookups, string manipulation, etc...) ! > But it should only be tringered on INSERTs, and I am doing an UPDATE ! Doh, right, I obviously still need to ingest more caffeine this morning. I think the conclusion must be that there was just too much I/O to be done to update all the rows. Have you done any tuning of shared_buffers and so forth? I recall having seen cases where update performance went bad as soon as the upper levels of a large index no longer fit into shared_buffers ... regards, tom lane