X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A9BCFD1D2AD for ; Mon, 9 Feb 2004 17:28:06 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 33889-01 for ; Mon, 9 Feb 2004 13:27:54 -0400 (AST) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by svr1.postgresql.org (Postfix) with ESMTP id 778E3D1CA65 for ; Mon, 9 Feb 2004 13:27:52 -0400 (AST) Received: from tmsl-adsl.demon.co.uk ([80.177.114.181] helo=bacon.tmsl.demon.co.uk) by anchor-post-35.mail.demon.net with esmtp (Exim 3.35 #1) id 1AqFCJ-000CUX-0Z; Mon, 09 Feb 2004 17:27:51 +0000 Date: Mon, 9 Feb 2004 17:27:48 +0000 From: Paul Thomas To: Christoph Haller Cc: "pgsql-sql @ postgresql . org" Subject: Re: Index not used - now me Message-ID: <20040209172748.A12934@bacon> References: <20040209142819.A12693@bacon> <200402091502.QAA19246@rodos> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 In-Reply-To: <200402091502.QAA19246@rodos>; from ch@rodos.fzk.de on Mon, Feb 09, 2004 at 15:02:40 +0000 X-Mailer: Balsa 1.2.3 Lines: 25 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/89 X-Sequence-Number: 16780 On 09/02/2004 15:02 Christoph Haller wrote: > [snip] > Thanks for your reply so far, but there is one thing I still don't > understand. > You wrote > It was disabling seqscan that > was forcing an index scan to appear to be the least costly operation. > > Why appear? If the Index Scan has a Total runtime: 2.46 msec and the Seq > Scan > a Total runtime: 46.19 msec, then the Index Scan is much faster. > Or am I completely off the track reading the explain analyze output? No, I think it's me who's not reading the output correctly :( I didn't look closely enough to spot the run time difference. How many rows are there in the table? -- Paul Thomas +------------------------------+---------------------------------------------+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+---------------------------------------------+