Re: bitmask index - Mailing list pgsql-performance

From Robert Klemme
Subject Re: bitmask index
Date
Msg-id itvnln$vcd$1@dough.gmane.org
Whole thread Raw
In response to Re: bitmask index  (Greg Smith <greg@2ndQuadrant.com>)
List pgsql-performance
On 06/22/2011 11:42 PM, Greg Smith wrote:
> On 06/22/2011 05:27 PM, Marcus Engene wrote:
>> I have some tables with bitmask integers. Set bits are the interesting
>> ones. Usually they are sparse.
>
> If it's sparse, create a partial index that just includes rows where the
> bit is set:
> http://www.postgresql.org/docs/current/static/indexes-partial.html

That would mean that if different bits are queried there would need to
be several of those indexes.

Maybe it's an alternative to index all rows where misc_bits <> 0 and
include that criterion in the query.

Kind regards

    robert

pgsql-performance by date:

Previous
From: Greg Smith
Date:
Subject: Re: bitmask index
Next
From: Harry Mantheakis
Date:
Subject: Long Running Update