X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C0A6AD7879; Thu, 25 Aug 2005 20:50:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39252-06; Thu, 25 Aug 2005 23:50:39 +0000 (GMT) Received: from 217-20-115-93.internetserviceteam.com (217-20-115-93.internetserviceteam.com [217.20.115.93]) by svr1.postgresql.org (Postfix) with ESMTP id 00A0DD785B; Thu, 25 Aug 2005 20:50:37 -0300 (ADT) Received: from [192.168.1.123] (91.Red-83-33-222.pooles.rima-tde.net [83.33.222.91]) by 217-20-115-93.internetserviceteam.com (Postfix) with ESMTP id C9C12395D4; Fri, 26 Aug 2005 01:01:23 +0200 (CEST) Message-ID: <430E5945.4000408@mediaroot.de> Date: Fri, 26 Aug 2005 00:50:29 +0100 From: Aldor User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Fuhr Cc: "Marc G. Fournier" , pgsql-admin@postgresql.org Subject: Re: What is syslog:duration reporting ... ? References: <20050825152428.T1044@ganymede.hub.org> <430E12F1.1080206@mediaroot.de> <20050825155331.V1044@ganymede.hub.org> <20050825195508.GA54074@winnie.fuhr.org> <20050825195940.GA54140@winnie.fuhr.org> In-Reply-To: <20050825195940.GA54140@winnie.fuhr.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200508/332 X-Sequence-Number: 18651 Aug 25 14:53:32 forgehouse-s1 postgres[23721]: [2-1] LOG: duration: 567.559 ms statement: UPDATE session SET hit_time=now() WHERE md5='7537b74eab488de54d6e0167d1919207'; Aug 25 14:53:32 forgehouse-s1 postgres[23722]: [2-1] LOG: duration: 565.966 ms statement: UPDATE session SET hit_time=now() WHERE md5='d84613009a95296fb511c2cb051ad618'; Aug 25 14:53:33 forgehouse-s1 postgres[23723]: [2-1] LOG: duration: 1192.789 ms statement: UPDATE session SET hit_time=now() WHERE md5='d84613009a95296fb511c2cb051ad618'; Aug 25 14:53:53 forgehouse-s1 postgres[23727]: [2-1] LOG: duration: 12159.162 ms statement: UPDATE session SET hit_time=now() WHERE md5='d84613009a95296fb511c2cb051ad618'; Aug 25 14:53:54 forgehouse-s1 postgres[23728]: [2-1] LOG: duration: 3283.185 ms statement: UPDATE session SET hit_time=now() WHERE md5='7537b74eab488de54d6e0167d1919207'; Aug 25 14:53:57 forgehouse-s1 postgres[23729]: [2-1] LOG: duration: 2116.516 ms statement: UPDATE session SET hit_time=now() WHERE md5='7537b74eab488de54d6e0167d1919207'; Take a look to the timestamps... they are not really close to each other... Michael Fuhr wrote: > On Thu, Aug 25, 2005 at 01:55:08PM -0600, Michael Fuhr wrote: > >>Are the updates happening inside a transaction? Is it possible >>that they're being blocked by other transactions that update the >>same record around the same time and don't commit immediately? >>I can duplicate the results you're seeing by doing that. > > > As for why you don't see long durations with EXPLAIN ANALYZE, here's > a possible explanation: "ordinary" updates of the same record might > happen close together because that's how the application works, but > by the time you run EXPLAIN ANALYZE no other transactions are updating > that record so the update executes immediately. >