Can indexes be used for bit-filtering queries? For example: create table tt ( flags integer not null default 0, str varchar ); select * from tt where (flags & 16) != 0;I suspected radix trees could be used for this but it seems it doesn't work that way.
If not, is there a way of quickly filtering by such "elements of a set" that doesn't involve creating 32 boolean fields (which would also need to be pretty uselessly indexed separately)?
Would strings and regular expressions work?