100k bit column in PostgreSQL
The solution I'm moving ahead with is to have an smallint[] which esentially gives me a total of 65k unique values / bits. I will then store the index of the bits that are 'on'. This won't be very efficent in terms of storage if densely populated. I could use int4 for higher indexes but this would consume even more space.
I can query it for off bits using @&gt; operator.
I should be able to index this with a GIN index.