Re: No Key on LIKE% (was: Performance issues.)

2001-02-09 Thread Steve Ruby
Benjamin Pflugmann wrote: > > Hi. > > On Thu, Feb 08, 2001 at 02:48:15PM -0700, [EMAIL PROTECTED] wrote: > [...] > > While we are (were) on the subject.. Any thoughts why like would not be > > using an index in this case? > > > > mysql> explain select * from _data where datatime like '12:00:%';

Re: No Key on LIKE% (was: Performance issues.)

2001-02-09 Thread Benjamin Pflugmann
Hi. On Thu, Feb 08, 2001 at 02:48:15PM -0700, [EMAIL PROTECTED] wrote: [...] > While we are (were) on the subject.. Any thoughts why like would not be > using an index in this case? > > mysql> explain select * from _data where datatime like '12:00:%'; > +---+--+---+--+---

No Key on LIKE% (was: Performance issues.)

2001-02-08 Thread Steve Ruby
Quentin Bennett wrote: > > Hi, > > For an indexed column, the index is used if the start of the string is used: > > LIKE 'a string of text%' may use an index > LIKE '%any old string%' will not, since the start of the string is unknown. > > The index will only be used if the server decides th