X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AF1F88B9E74 for ; Sun, 6 Feb 2005 22:35:05 +0000 (GMT) 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 64354-07 for ; Sun, 6 Feb 2005 22:34:56 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id 6A7308B9B56 for ; Sun, 6 Feb 2005 22:34:55 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1CxuzQ-0002Ft-00; Sun, 06 Feb 2005 17:34:48 -0500 To: "Leeuw van der, Tim" Cc: "Steven Rosenstein" , Subject: Re: Can the V7.3 EXPLAIN ANALYZE be trusted? References: In-Reply-To: From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 06 Feb 2005 17:34:47 -0500 Message-ID: <87lla1iago.fsf@stark.xeocode.com> Lines: 19 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.056 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/102 X-Sequence-Number: 10431 "Leeuw van der, Tim" writes: > I don't think EXPLAIN ANALYZE puts that much overhead on a query. EXPLAIN ANALYZE does indeed impose a significant overhead. What percentage of the time is overhead depends heavily on how much i/o the query is doing. For queries that are primarily cpu bound because they're processing data from the cache it can be substantial. If all the data is in the shared buffers then the gettimeofday calls for explain analyze can be just about the only syscalls being executed and they're executed a lot. It would be interesting to try to subtract out the profiling overhead from the data like most profilers do. But it's not an easy thing to do since the times are nested. -- greg