View Single Post
Old 10-11-2012, 12:08 AM   PM User | #13
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,200
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
So what kind of performance did you get from the query in my post #8?

I forgot to mention something: A condition that uses LIKE can *NOT* use an index, except in the specialized case of WHERE field LIKE 'xxx%'

That is, where the only % wild card character is at the end of the string to match via LIKE.

So your query is FORCING MySQL to do a COMPLETE scan of the entire OFFERS table.

And that's why it's slow. And why it would be hard to make it faster.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
markman641 (10-12-2012)