PHP strtoupper () vs. MySQL UPPER () Performance

When doing a case insensitive comparison of two strings, one string coming from the web page and the other coming from the database using (in this case) uppercase conversion functions / methods:

It's better / faster / etc. to:
execute strtoupper () in PHP before sending it to query for comparison?
OR
execute UPPER () in SQL on the query itself?

And does this apply to most functions / methods between PHP and MySQL, or is it mostly an isolated case?

+3


source to share





All Articles