I\'m using a django application which does some \'startswith\' ORM operations comparing longtext
columns with a unicode string. This results in a LIKE BI
A trick: If you don't want to change the type of your column to binary, try to write your WHERE
statement like this:
WHERE field = 'yourstring' AND field LIKE BINARY 'yourstring'
instead of:
WHERE field LIKE BINARY 'yourstring'
Indeed, it will check the first condition very quickly, and try the second one only if the first one is true.
It worked well on my project for this test of equality, and I think you can adapt this to the "starts with" test.