Re: Indices types, what to use. Btree, Hash, Gin or Gist

From: Kevin Murphy <murphy(at)genome(dot)chop(dot)edu>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Mohamed <mohamed5432154321(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Indices types, what to use. Btree, Hash, Gin or Gist
Date: 2009-02-01 00:52:31
Message-ID: 4984F24F.2020505@genome.chop.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gregory Stark wrote:
> Mohamed <mohamed5432154321(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Milen A. Radev 2009-02-01 00:59:35 Re: [GENERAL] Encoding problem using pg_dumpall
Previous Message Octavio Alvarez 2009-01-31 23:54:10 Re: Pet Peeves?