What is the best way to create an index on a bit string column? Let's say I had the column of type bit(4)
and I wanted to search for all entries that had had a specific bit set. So if I had the entries:
bitfield | ...
--------------
1001
1010
0110
0010
0000
If I was trying to search for all entries that 0010
set, I can easily do that. But can I use indexes to optimize the searching?