X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 7ED0D9FA4C1 for ; Fri, 16 Jun 2006 13:13:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 54942-02 for ; Fri, 16 Jun 2006 13:13:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from cronos.madness.at (madness.at [217.196.146.217]) by postgresql.org (Postfix) with ESMTP id 0EFD99FA5D8 for ; Fri, 16 Jun 2006 13:13:07 -0300 (ADT) Received: from mastermind.kaltenbrunner.cc ([83.215.233.60]) by cronos.madness.at with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.62 (FreeBSD)) (envelope-from ) id 1FrGwE-00062A-Sw; Fri, 16 Jun 2006 18:13:00 +0200 Message-ID: <4492D882.6030109@kaltenbrunner.cc> Date: Fri, 16 Jun 2006 18:12:50 +0200 From: Stefan Kaltenbrunner User-Agent: Thunderbird 1.5.0.2 (X11/20060516) MIME-Version: 1.0 To: Bruce Momjian CC: Qingqing Zhou , pgsql-hackers@postgresql.org Subject: Re: Test request for Stats collector performance improvement References: <200606161603.k5GG3MS27858@candle.pha.pa.us> In-Reply-To: <200606161603.k5GG3MS27858@candle.pha.pa.us> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/804 X-Sequence-Number: 85037 Bruce Momjian wrote: > OK, based on reports I have seen, generally stats_query_string adds 50% > to the total runtime of a "SELECT 1" query, and the patch reduces the > overhead to 25%. that is actually not true for both of the platforms(a slow OpenBSD 3.9/x86 and a very fast Linux/x86_64) I tested on. Both of them show virtually no improvement with the patch and even worst it causes considerable (negative) variance on at least the Linux box. > > However, that 25% is still much too large. Consider that "SELECT 1" has > to travel from psql to the server, go through the > parser/optimizer/executor, and then return, it is clearly wrong that the > stats_query_string performance hit should be measurable. > > I am actually surprised that so few people in the community are > concerned about this. While we have lots of people studying large > queries, these small queries should also get attention from a > performance perspective. > > I have created a new test that also turns off writing of the stats file. > This will not pass regression tests, but it will show the stats write > overhead. will try to run those too in a few. Stefan