index not used for boolean

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: index not used for boolean
Date: 2004-05-04 07:04:39
Message-ID: c77fad$qru$1@floppy.pyrenet.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi all,
is it normal that in a select like:

select * from foo where expired;

the index on expired is not used?

If I rewrite that query:

select * from foo where expired = true;

then the index is used!

I'm using postrgres 7.4.2

Regards
Gaetano Mendola

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Noah Davis 2004-05-04 14:09:19 Re: Bad character data
Previous Message douglas morrison 2004-05-03 23:11:11 Re: Bad character data