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 127EC5E40AC for ; Fri, 20 Aug 2004 06:37:44 -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 28474-10 for ; Fri, 20 Aug 2004 09:37:35 +0000 (GMT) Received: from pns.mm.eutelsat.org (pns.mm.eutelsat.org [194.214.173.227]) by svr1.postgresql.org (Postfix) with ESMTP id DACAA5E37CE for ; Fri, 20 Aug 2004 06:37:33 -0300 (ADT) Received: from nts-03.mm.eutelsat.org (localhost [127.0.0.1]) by pns.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i7K9asn17294; Fri, 20 Aug 2004 11:36:54 +0200 Received: from [127.0.0.1] (accesspoint.mm.eutelsat.org [194.214.173.4]) by nts-03.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i7K9bZJ10993; Fri, 20 Aug 2004 11:37:35 +0200 Message-ID: <4125C657.7000702@bigfoot.com> Date: Fri, 20 Aug 2004 11:37:27 +0200 From: Gaetano Mendola User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christopher Kings-Lynne Cc: Richard Huxton , pgsql-performance@postgresql.org Subject: Re: using an index worst performances References: <4124ECF3.6040901@archonet.com> <412505F6.6080000@bigfoot.com> <4125565D.3060008@familyhealth.com.au> In-Reply-To: <4125565D.3060008@familyhealth.com.au> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime 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/297 X-Sequence-Number: 7933 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christopher Kings-Lynne wrote: |>>> 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. The time increase seems too much. Regards Gaetano Mendola -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBJcZW7UpzwH2SGd4RAuiMAJ971EAtr1RrHu2QMi0YYk0kKeuQmACg9bd3 CFcmq5MRG/Eq3RXdNOdu43Y= =Bvo8 -----END PGP SIGNATURE-----