I have a db query that will lead to a full table scan using a similar sentence and came across a question that interests me ...
Which of the following should run faster in Mysql or will they work at the same speed? Benchmarking can answer it in my case, but I would like to know why the answer. The filtered column contains several thousand characters, if important.
SELECT * FROM users WHERE data LIKE '%=12345%'
or
SELECT * FROM users WHERE data LIKE '%proileId=12345%'
I can find reasons why each of them can perform the other, but I'm curious to know the logic.
performance mysql
Allain lalonde
source share