Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 8655A9FA19B for ; Thu, 14 Dec 2006 11:23:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 73867-06 for ; Thu, 14 Dec 2006 11:22:59 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from serveurmail01.codata.be (125.123.146.82.ipv4.evonet.be [82.146.123.125]) by postgresql.org (Postfix) with ESMTP id D84849FA28E for ; Thu, 14 Dec 2006 11:23:05 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by serveurmail01.codata.be (Postfix) with ESMTP id 0C6381838791; Thu, 14 Dec 2006 16:23:04 +0100 (CET) X-DSPAM-Result: Innocent X-DSPAM-Processed: Thu Dec 14 16:23:01 2006 X-DSPAM-Confidence: 0.9997 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 45816c5527322932916029 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at Received: from serveurmail01.codata.be ([127.0.0.1]) by localhost (serveurmail01.codata.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Exfa17FHKRud; Thu, 14 Dec 2006 16:23:01 +0100 (CET) Received: from [127.0.0.1] (38-179-112-217.fix.adsl.belcenter.be [217.112.179.38]) by serveurmail01.codata.be (Postfix) with ESMTP id 6B5441838786; Thu, 14 Dec 2006 16:23:01 +0100 (CET) Message-ID: <45816C54.5010602@freesurf.fr> Date: Thu, 14 Dec 2006 16:23:00 +0100 From: Arnaud Lesauvage User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Tom Lane CC: Ragnar , Jens Schipkowski , pgsql-performance@postgresql.org Subject: Re: Slow update with simple query 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> In-Reply-To: <20426.1166109494@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 0658-1, 14/12/2006), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/367 X-Sequence-Number: 22423 Tom Lane a écrit : > Arnaud Lesauvage writes: >> I must be missing something, so here is the full table description. > > It looks pretty harmless, except for > >> CREATE TRIGGER parse_log_trigger >> BEFORE INSERT >> ON statistiques.log >> FOR EACH ROW >> EXECUTE PROCEDURE statistiques.parse_log_trigger(); > > 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 ! I can post the function's body if you want. Regards -- Arnaud