The following is the piece describing LIKE and INDEX from the manual. The real
question is does REGEXP use indexes.
Using explain shows that it actually does, probably with the same rules as LIKE!!!
Thanks for your help.
MySQL also uses indexes for LIKE comparisons if the argument to LIKE is
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
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
On Sun, Feb 10, 2002 at 10:01:45PM -0600, Paul DuBois wrote:
> 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
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%' ??
I could not find this info in the manual.
Thanks in advance
Matthew Dougherty
Consultant:
At 21:30 -0800 2/10/02, Jeremy Zawodny wrote:
>On Sun, Feb 10, 2002 at 10:01:45PM -0600, Paul DuBois wrote:
>> 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
At 21:30 -0800 2/10/02, Jeremy Zawodny wrote:
>On Sun, Feb 10, 2002 at 10:01:45PM -0600, Paul DuBois wrote:
>> 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
On Sun, Feb 10, 2002 at 10:01:45PM -0600, Paul DuBois wrote:
> 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
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
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
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%' ??
I could not find this info in the manual.
Thanks in advance
Matthew Dougherty
Consultant:
11 matches
Mail list logo