X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D1BBD9DC80E for ; Thu, 26 Jan 2006 12:50:04 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53906-02 for ; Thu, 26 Jan 2006 12:50:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 282AF9DC809 for ; Thu, 26 Jan 2006 12:50:02 -0400 (AST) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 8A1AE40BAF7; Thu, 26 Jan 2006 16:49:49 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 46F7F11F6F; Thu, 26 Jan 2006 16:50:00 +0000 (GMT) Message-ID: <43D8FDB7.10905@archonet.com> Date: Thu, 26 Jan 2006 16:49:59 +0000 From: Richard Huxton User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Jozsef Szalay Cc: pgsql-performance@postgresql.org Subject: Re: Incorrect Total runtime Reported by Explain Analyze!? References: In-Reply-To: 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, score=0.267 required=5 tests=[AWL=-0.059, PLING_QUERY=0.326] X-Spam-Score: 0.267 X-Spam-Level: X-Archive-Number: 200601/445 X-Sequence-Number: 16923 Jozsef Szalay wrote: > > I have seen it on occasion that the total runtime reported by explain > analyze was much higher than the actual time the query needed to > complete. The differences in my case ranged between 20-120 seconds. I'm > just curious if anyone else has experienced this and whether there is > something that I can do to convince explain analyze to report the > execution time of the query itself rather than the time of its own > execution. Engine version is 8.1.1. I think it's down to all the gettime() calls that have to be made to measure how long each stage of the query takes. In some cases these can take a substantial part of the overall query time. I seem to recall one of the BSDs was particularly bad in this respect a couple of years ago. Does that sound like your problem? -- Richard Huxton Archonet Ltd