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 9B3625E46C0 for ; Thu, 19 Aug 2004 22:37:49 -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 77129-01 for ; Fri, 20 Aug 2004 01:37:42 +0000 (GMT) Received: from houston.familyhealth.com.au (fhnet.arach.net.au [203.22.197.21]) by svr1.postgresql.org (Postfix) with ESMTP id 232BB5E3631 for ; Thu, 19 Aug 2004 22:37:39 -0300 (ADT) Received: from [192.168.0.40] (work-40.internal [192.168.0.40]) by houston.familyhealth.com.au (8.12.9p1/8.12.9) with ESMTP id i7K1a8Ui024619; Fri, 20 Aug 2004 09:36:08 +0800 (WST) (envelope-from chriskl@familyhealth.com.au) Message-ID: <4125565D.3060008@familyhealth.com.au> Date: Fri, 20 Aug 2004 09:39:41 +0800 From: Christopher Kings-Lynne User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gaetano Mendola Cc: Richard Huxton , pgsql-performance@postgresql.org Subject: Re: using an index worst performances References: <4124ECF3.6040901@archonet.com> <412505F6.6080000@bigfoot.com> In-Reply-To: <412505F6.6080000@bigfoot.com> 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/296 X-Sequence-Number: 7932 >>> 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. > > > > It mean 1.8 ms and that execution time is sticky to that value even > with 1000 times. Given the almost irrelvant difference in the speed of those queries, I'd say that with the stats so high, postgres simply takes longer to check the statistics to come to the same conclusion. ie. it has to loop over 200 rows instead of just 10. Chris