Re: select count(*) from anIntColumn where int_value = 0; is very slow - Mailing list pgsql-performance

From PC Drew
Subject Re: select count(*) from anIntColumn where int_value = 0; is very slow
Date
Msg-id 1CC1B9FA-5C98-11D8-8191-000A95EA00C0@ibsncentral.com
Whole thread Raw
In response to Re: select count(*) from anIntColumn where int_value = 0; is very slow  (David Teran <david.teran@cluster9.com>)
List pgsql-performance
Had you done a VACUUM ANALYZE at all?  There has been much discussion
lately about the planner needing to be updated to know that the index
is a better choice.

On Feb 11, 2004, at 6:32 AM, David Teran wrote:

> Hi,
>
>> 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.
>
> regards David
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org
>

--
PC Drew
Manager, Dominet

IBSN
1600 Broadway, Suite 400
Denver, CO 80202

Phone: 303-984-4727 x107
Cell: 720-841-4543
Fax: 303-984-4730
Email: drewpc@ibsncentral.com


pgsql-performance by date:

Previous
From: David Teran
Date:
Subject: Re: select count(*) from anIntColumn where int_value = 0; is very slow
Next
From: stefan bogdan
Date:
Subject: update performance