0

Dear team,

Please explain, which one will be faster in Mysql for the following query?

SELECT * FROM `userstatus` where BINARY Name = 'Raja'

[OR]

SELECT * FROM `userstatus` where Name = 'raja'

Db entry for Name field is 'Raja' there is no key for the field.

I have 1000000 records in my db, i tried with "explain" query but both saying same execution time.

Thank you,

With Regards,
Prem2

4
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by iw2011
0

EXPLAIN doesn't tell you anything about execution time but only about query optimization.

Then there should be no difference.

Why not? A binary comparison does not need any conversion before the comparison, while a non-binary string comparison requires some operations for case matching. Therefore a non-binary comparison should need more time - though I never saw a relevant performance gap in a real-life application between binary and non-binary comparisons.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.