Re: select count(*) from anIntColumn where int_value =

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: David Teran <david(dot)teran(at)cluster9(dot)com>, Rigmor Ukuhe <rigmor(dot)ukuhe(at)finestmedia(dot)com>, PgSQL Performance ML <pgsql-performance(at)postgresql(dot)org>
Subject: Re: select count(*) from anIntColumn where int_value =
Date: 2004-02-12 02:01:49
Message-ID: 402ADE8D.1090802@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


>>>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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Leon Out 2004-02-12 18:29:49 Disappointing performance in db migrated from MS SQL Server
Previous Message Mark Kirkwood 2004-02-12 01:27:44 Re: slow database