At 9:31 AM -0700 4/26/01, Shane Gentry wrote:
>  Does it help to put an Index on a column when you
>  use a LIKE query.
>
>  ex. SELECT * FROM users WHERE name LIKE '%tom%'
>
>  Thanks in Advance!
>

In this case, It won't help, since you have a wildcard at the 
beginning of your pattern. If you used ...LIKE 'tom%' instead, I 
believe MySQL WOULD use an index on 'name.'

-steve

-- 
+---------- KDVS 90.3fm Annual Fundraiser : 16 - 22 April 2001 ----------+
| Steve Edberg                           University of California, Davis |
| [EMAIL PROTECTED]                               Computer Consultant |
| http://aesric.ucdavis.edu/                  http://pgfsun.ucdavis.edu/ |
+----------------------------- www.kdvs.org -----------------------------+

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to