Note that in some contexts, if you cast an indexed column to BINARY , MySQL is not able to use the index efficiently.
dev.mysql.com