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:%';
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:%';
> +---+--+---+--+---
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