pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Klemme <shortcutter@googlemail.com>
To: pgsql-performance@postgresql.org
Subject: Re: bitmask index
Date: Thu, 23 Jun 2011 17:55:35 +0200
Message-ID: <itvnln$vcd$1@dough.gmane.org> (raw)
In-Reply-To: <4E0261C1.8000807@2ndQuadrant.com>
References: <4E025E54.6020402@engene.se>
	<4E0261C1.8000807@2ndQuadrant.com>

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




view thread (5+ messages)  latest in thread

Message-ID: <itvnln$vcd$1@dough.gmane.org>
Permalink:  ../itvnln$vcd$1@dough.gmane.org/
Also on:    postgresql.org/message-id/itvnln$vcd$1@dough.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: shortcutter@googlemail.com
  Subject: Re: bitmask index
  In-Reply-To: <itvnln$vcd$1@dough.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox