At 18:07 -0800 2/10/02, Jeremy Zawodny wrote:
>On Sun, Feb 10, 2002 at 02:53:53PM -0500, Matthew Dougherty wrote:
>> If I use a REGEXP query on an indexed column using something like:
>> Field REGEXP '^A|^B|^C'
>> Will MySQL use the index like it would if I used Field LIKE 'A%' or
>> Field LIKE 'B%' or FIeld LIKE 'C%' ??
>It will not.
>Regular expressions are best used when you need something more complex
>than what "%" allows you to achieve.
Not to mention that an index won't be used even for the LIKE expression,
because it uses OR. At least, I think it won't be.
>Jeremy D. Zawodny, <jzawodn@stripped>
>Technical Yahoo - Yahoo Finance
>Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936
>MySQL 3.23.47-max: up 3 days, processed 121,771,991 queries (403/sec. avg)