SQLite Forum

SQLite doesn't use indexes for bitwise clauses?
Login
I only use bitwise operators on columns designed to be bitfields. Even though INTEGER is int64 I only use it as uint64 (when bitfields are in play).

That's also why I only need equality comparisons (often !=0, less often =0, rarely =0x1234 or other multi-bit pattern)

I use expression-based and partial indexes for other reasons but after some quick experimentation they don't seem to help here. I'd need to deeper analysis to see if I could make it work, but it's a complex puzzle so fiddling here can have unintended consequences. IOW like many things in life, it's complicated