Re: Indices types, what to use. Btree, Hash, Gin or Gist - Mailing list pgsql-general

From Kevin Murphy
Subject Re: Indices types, what to use. Btree, Hash, Gin or Gist
Date
Msg-id 4984F24F.2020505@genome.chop.edu
Whole thread Raw
In response to Re: Indices types, what to use. Btree, Hash, Gin or Gist  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-general
Gregory Stark wrote:
> Mohamed <mohamed5432154321@gmail.com> writes:
>
>
>> I want to match against a boolean field, that is, only true or false is
>> possible. I am thinking Btree but not sure.. correct?
>>
>
> No index is going to be particularly effective for boolean columns unless
> they're very heavily skewed. You might find it useful to build separate
> partial indexes on other keys for each value though.
>
Gregory,

Just for the edification of the masses, can you show an example that
illustrates your point about partial indexes?

-Kevin


pgsql-general by date:

Previous
From: Octavio Alvarez
Date:
Subject: Re: Pet Peeves?
Next
From: Scott Marlowe
Date:
Subject: Re: Indices types, what to use. Btree, Hash, Gin or Gist