Re: Putting an INDEX on a boolean field?

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Putting an INDEX on a boolean field?
Date: 2005-06-17 05:04:12
Message-ID: 20050617020039.P90456@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, 17 Jun 2005, Tom Lane wrote:

> "Marc G. Fournier" <scrappy(at)postgresql(dot)org> writes:
>> Does that make sense? Would it ever get used?
>
> It could get used if one of the two values is far less frequent than the
> other. Personally I'd think about a partial index instead ...

Hrmmmm, hadn't thought of that ... wouldn't you have to build two indexes
(one for true, one for false) for this to be completely effective? unless
you know all your queries are going to search for one, but not the other?

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jaime Casanova 2005-06-17 05:42:22 Re: Putting an INDEX on a boolean field?
Previous Message Tom Lane 2005-06-17 04:41:49 Re: Putting an INDEX on a boolean field?