Re: [PERFORM] Performant queries on table with many boolean columns

2016-04-20 Thread Rick Otten
Would a bit string column work? -- http://www.postgresql.org/docs/9.5/static/datatype-bit.html You might need to use a lot of bitwise OR statements in the query though if you are looking at very sparse sets of specific values... Something like the get_bit() function might allow you to select a sp

Re: [PERFORM] Performant queries on table with many boolean columns

2016-04-20 Thread Teodor Sigaev
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.

[PERFORM] Performant queries on table with many boolean columns

2016-04-20 Thread Rob Imig
Hey all, New to the lists so please let me know if this isn't the right place for this question. I am trying to understand how to structure a table to allow for optimal performance on retrieval. The data will not change frequently so you can basically think of it as static and only concerned abou