Re: Performant queries on table with many boolean columns - Mailing list pgsql-performance

From Jeff Janes
Subject Re: Performant queries on table with many boolean columns
Date
Msg-id CAMkU=1xXXANTYp7YLQjjzvgYCFQsr+y6iTphx1Q4y8iP7QpRjw@mail.gmail.com
Whole thread Raw
In response to Re: Performant queries on table with many boolean columns  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: Performant queries on table with many boolean columns  (Rob Imig <rimig88@gmail.com>)
List pgsql-performance
On Wed, Apr 20, 2016 at 11:54 AM, Teodor Sigaev <teodor@sigaev.ru> wrote:
>>
>> The obvious thing seems to make a table with ~100 columns, with 1 column
>> for each boolean property. Though, what type of indexing strategy would
>> one use on that table? Doesn't make sense to do BTREE. Is there a better
>> way to structure it?
>>
> looks like a deal for contrib/bloom index in upcoming 9.6 release

Not without doing a custom compilation with an increased INDEX_MAX_KEYS:

ERROR:  cannot use more than 32 columns in an index

But even so, I'm skeptical this would do better than a full scan.  It
would be interesting to test that.

Cheers,

Jeff


pgsql-performance by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Performant queries on table with many boolean columns
Next
From: Rob Imig
Date:
Subject: Re: Performant queries on table with many boolean columns