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 5E2CF5E46DC for ; Thu, 19 Aug 2004 15:10:05 -0300 (ADT) 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 31988-01 for ; Thu, 19 Aug 2004 18:10:01 +0000 (GMT) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by svr1.postgresql.org (Postfix) with ESMTP id 3B9035E46D8 for ; Thu, 19 Aug 2004 15:10:00 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 1BxrML-00026w-0V; Thu, 19 Aug 2004 18:09:57 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 1AD9015A0B; Thu, 19 Aug 2004 19:09:55 +0100 (BST) Message-ID: <4124ECF3.6040901@archonet.com> Date: Thu, 19 Aug 2004 19:09:55 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gaetano Mendola Cc: pgsql-performance@postgresql.org Subject: Re: using an index worst performances References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/294 X-Sequence-Number: 7930 Gaetano Mendola wrote: > Hi all, > I'm tring to optimize the following query: > > http://rafb.net/paste/results/YdO9vM69.html > > as you can see from the explain after defining the > index the performance is worst. > > If I raise the default_statistic_target to 200 > then the performance are worst then before: > > > Without index: 1.140 ms > With index: 1.400 ms > With default_statistic_targer = 200: 1.800 ms Can I just check that 1.800ms means 1.8 secs (You're using . as the thousands separator)? If it means 1.8ms then frankly the times are too short to mean anything without running them 100 times and averaging. -- Richard Huxton Archonet Ltd