On Mar 27, 10:58 am, sandro wrote:
> Hi,
>
> is it any possible/usefull to add an index for bitwise comparison
> (e.g.: ti2.t_m3 & 134217728). I don't think so but I'm not totally
> sure.
An ordinary BTree index can help you narrow down the search if you
know the leading bits. For example, if your keys are 8 bits, values
matching
0,1,0,X,X,X,X,X
can be extracted by
key BETWEEN 64 AND (64+31)
Depending on your data and query patterns it may be more efficient to
break the bitmask into separate indexed columns, or even normalise
further into individual relations.
>
> Thanks
> sandro >> Stay informed about: index for bitwise comparison?