MySQL: Which is faster — INSTR or LIKE?
- by Grekker
If your goal is to test if a string exists in a MySQL column (of type 'varchar', 'text', 'blob', etc) which of the following is faster / more efficient / better to use, and why?
Or, is there some other method that tops either of these?
INSTR( columnname, 'mystring' ) > 0
vs
columnname LIKE '%mystring%'