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 BBAE4566FB for ; Tue, 22 Mar 2005 16:20:09 +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 85265-01 for ; Tue, 22 Mar 2005 16:19:58 +0000 (GMT) Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by svr1.postgresql.org (Postfix) with ESMTP id A518F569AC for ; Tue, 22 Mar 2005 16:19:54 +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 1DDm6X-0007w4-00; Tue, 22 Mar 2005 11:19:41 -0500 To: Richard Huxton Cc: Greg Stark , Josh Berkus , Tambet Matiisen , pgsql-performance@postgresql.org Subject: Re: What about utility to calculate planner cost constants? References: <200503210951.06044.josh@agliodbs.com> <87acowcmut.fsf@stark.xeocode.com> <424007E8.1020700@archonet.com> In-Reply-To: <424007E8.1020700@archonet.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 22 Mar 2005 11:19:40 -0500 Message-ID: <87y8cfbqlf.fsf@stark.xeocode.com> Lines: 25 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.014 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/452 X-Sequence-Number: 11157 Richard Huxton writes: > You'd only need to log them if they diverged from expected anyway. That should > result in fairly low activity pretty quickly (or we're wasting our time). > Should they go to the stats collector rather than logs? I think you need to log them all. Otherwise when you go to analyze the numbers and come up with ideal values you're going to be basing your optimization on a skewed subset. I don't know whether the stats collector or the logs is better suited to this. > > (Also, currently explain analyze has overhead that makes this impractical. > > Ideally it could subtract out its overhead so the solutions would be accurate > > enough to be useful) > > Don't we only need the top-level figures though? There's no need to record > timings for each stage, just work completed. I guess you only need top level values. But you also might want some flag if the row counts for any node were far off. In that case perhaps you would want to discard the data point. -- greg