Re: REGEXP and INDEX

2002-02-13 Thread Matthew Dougherty
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

Re: REGEXP and INDEX

2002-02-12 Thread Paul DuBois
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

Re: REGEXP and INDEX

2002-02-12 Thread Jeremy Zawodny
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

Re: REGEXP and INDEX

2002-02-12 Thread Jeremy Zawodny
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

REGEXP and INDEX

2002-02-12 Thread Matthew Dougherty
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:

Re: REGEXP and INDEX

2002-02-12 Thread Paul DuBois
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

Re: REGEXP and INDEX

2002-02-10 Thread Paul DuBois
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

Re: REGEXP and INDEX

2002-02-10 Thread Jeremy Zawodny
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

Re: REGEXP and INDEX

2002-02-10 Thread Paul DuBois
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

Re: REGEXP and INDEX

2002-02-10 Thread Jeremy Zawodny
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

REGEXP and INDEX

2002-02-10 Thread Matthew Dougherty
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: