X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id AF11FD1C9BD for ; Thu, 12 Feb 2004 01:54:39 +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 99696-03 for ; Wed, 11 Feb 2004 21:54:37 -0400 (AST) Received: from houston.familyhealth.com.au (fhnet.arach.net.au [203.22.197.21]) by svr1.postgresql.org (Postfix) with ESMTP id 9FB8FD1C9B4 for ; Wed, 11 Feb 2004 21:54:34 -0400 (AST) Received: from familyhealth.com.au (work-40.internal [192.168.0.40]) by houston.familyhealth.com.au (8.12.9p1/8.12.9) with ESMTP id i1C1s34v011350; Thu, 12 Feb 2004 09:54:03 +0800 (WST) (envelope-from chriskl@familyhealth.com.au) Message-ID: <402ADE8D.1090802@familyhealth.com.au> Date: Thu, 12 Feb 2004 10:01:49 +0800 From: Christopher Kings-Lynne User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "scott.marlowe" Cc: David Teran , Rigmor Ukuhe , PgSQL Performance ML Subject: Re: select count(*) from anIntColumn where int_value = References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/144 X-Sequence-Number: 5668 >>>Is your int_value data type int4? If not then use "... from >>>job_property >>>where int_value = '0'" >>>Indexes are used only if datatypes matches. >>> >> >>tried those variations already. Strange enough, after dropping and >>recreating the index everything worked fine. > > > Has that table been updated a lot in its life? If so, it may have had a > problem with index bloat... Try creating a partial index: create index blah on tablw where int_value=0; Chris