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?

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to