in reply to
Re: same query, different execution, different performance
in thread same query, different execution, different performance
This is one of those times when it's best to not prepare the statement with bind parameters. But use $dbh->quote(...) on your parameter and just inline it into the SQL.
Don't even think about $dbh->quote(), use SUBSTR instead of LIKE whenever you need to test the start of a string against a LIKE-pattern.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)