Hi,

On Fri, Oct 30, 2009 at 3:07 PM, Stig Manning <[email protected]> wrote:
>
> Hi PHPUG,
>
> Sorry for the OT post, I have a small problem with a search hinting
> table taking a long time to perform LIKE queries that you might have
> experience with.
>
> Would an index on the varchar field speed up the LIKE queries? My
> understanding of indexes is that they only work for direct select
> queries, and would only improve a field = value query.
>
> The queries are similar to LIKE 'act%'

I'm pretty sure they will speed up like 'act%' but not like '%act%'.
You may have to restrict the length of the index?

Jochen

--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to