On Tue, 2002-05-14 at 21:28, paul POULAIN wrote:
Many queries are build with :
(title like '$key[0]%' or title like '% $key[0]%')
I was wondering why :
* title like '$key%' is index optimizable
* title like '% $key%' is NOT index optimizable.
optimizable OR not optimizable === NOT optimizable.
So the resulting query is not optimizable.
So, what's the interest of such a string, as "title like '%'.$key.'%'"
has the same result ?
If title like '%'.$key.'%'" does the same thing and is optimisable then
we should use that.
NO query containing "like %something" may be optimized. This one is not
optimizable.