Re: [PERFORM] bitmask index

2011-07-05 Thread Greg Smith
On 07/05/2011 06:15 AM, Marcus Engene wrote: Though partial index solved another problem. Usually I'm a little bit annoyed with the optimizer and the developers religious "fix the planner instead of index hints". I must say that I'm willing to reconsider my usual stance to that. We have a lar

Re: [PERFORM] bitmask index

2011-07-05 Thread Marcus Engene
On 6/22/11 11:42 , 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.

Re: [PERFORM] bitmask index

2011-06-23 Thread Robert Klemme
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.postgresq

Re: [PERFORM] bitmask index

2011-06-22 Thread Greg Smith
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-partia

[PERFORM] bitmask index

2011-06-22 Thread Marcus Engene
Hi list, I use Postgres 9.0.4. I have some tables with bitmask integers. Set bits are the interesting ones. Usually they are sparse. -- Many rows & columns CREATE TABLE a_table ( objectid INTEGER PRIMARY KEY NOT NULL ,misc_bits INTEGER DEFAULT 0 NOT NULL ..