X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3026B9DC8DA for ; Tue, 3 Jan 2006 19:28:44 -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 38248-05 for ; Tue, 3 Jan 2006 19:28:46 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by postgresql.org (Postfix) with ESMTP id C4A569DC83E for ; Tue, 3 Jan 2006 19:28:41 -0400 (AST) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1EtvZz-0000N5-00; Tue, 03 Jan 2006 18:28:35 -0500 To: "Jim C. Nasby" Cc: Simon Riggs , Tom Lane , Qingqing Zhou , pgsql-hackers@postgresql.org Subject: Re: Stats collector performance improvement References: <200601021840.k02Ieed21704@candle.pha.pa.us> <11924.1136233224@sss.pgh.pa.us> <12503.1136238525@sss.pgh.pa.us> <1136281253.5052.113.camel@localhost.localdomain> <20060103163556.GH82560@pervasive.com> In-Reply-To: <20060103163556.GH82560@pervasive.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 03 Jan 2006 18:28:34 -0500 Message-ID: <878xtw6gd9.fsf@stark.xeocode.com> Lines: 24 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.113 required=5 tests=[AWL=0.113] X-Spam-Score: 0.113 X-Spam-Level: X-Archive-Number: 200601/133 X-Sequence-Number: 78237 "Jim C. Nasby" writes: > I would argue that minutes is too long, but of course this could be > user-adjustable. I suspect that even waiting just a second could be a > huge win, since this only matters if you're executing a lot of > statements and you won't be doing that if those statements are taking > more than a second or two to execute. That's not necessarily true at all. You could just as easily have a performance problem caused by a quick statement that is being executed many times as a slow statement that is being executed few times. That is, you could be executing dozens of queries that take seconds or minutes once a second but none of those might be the problem. The problem might be the query that's taking only 300ms that you're executing hundreds of of times a minute. Moreover, if you're not gathering stats for queries that are fast then how will you know whether they're performing properly when you look at them when they do show up? -- greg