MySQL: binary search without index

This is a flash of a genius:

Problem: you can’t search case insensitive words. This trick will “do” it for you.

Make a test between this two ways:

SELECT * FROM test WHERE binary login = ‘SomeCaseSensitiveLogin’

is million times slower then

SELECT * FROM test WHERE login = ‘SomeCaseSensitiveLogin’ AND binary login = ‘SomeCaseSensitiveLogin’

About tompos

Hungary, Budapest
This entry was posted in IT. Bookmark the permalink.

Leave a Reply