Re: bitmask index

From: Robert Klemme <shortcutter(at)googlemail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: bitmask index
Date: 2011-06-23 15:55:35
Message-ID: itvnln$vcd$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Claudio Freire 2011-06-23 17:18:23 Re: Long Running Update
Previous Message Harry Mantheakis 2011-06-23 15:05:45 Long Running Update