Is there any performance gain in indexing a boolean field?

Just to put a finer point on several other answers here, since in my experience, those looking at questions like this are in the same boat we were, we’ve all heard that indexing Boolean fields is pointless, and yet…

We have a table with about 4 million rows, only about 1000 or so at a time will have a Boolean switch flagged and that’s what we search against. Adding an index on our Boolean field sped up queries by orders of magnitude, it went from about 9+ seconds to a fraction of a second.

Leave a Comment