Actually indexes ARE used on queries that use "LIKE" when a full table scan
is not required.
example.....select * from table where name like 'stud%' will use an index on
name (if one exists) whereas
                    select * from table where name like '%stud% will always
require a full table scan.

-----Original Message-----
From: Vincent Stoessel <[EMAIL PROTECTED]>
To: Brett Error <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, January 14, 1999 5:14 AM
Subject: Re: mysql: Index on "like" query


>I don't believe indexes are used in queries that use "LIKE"
>
>Brett Error wrote:
>>
>> I have a query:
>> select page from pages where page_url like
>> "http://members.aol.com/blahblah/index.htm%" limit 1
>>
>> Would an index on page_url speed this query along?
>>
>> Thanks,
>>
>> ______________________
>> Brett Error
>> SuperStats.com
>> Free Visitor Statistics for your Website
>> http://www.superstats.com
>>
>> -----------------------------------------------------------
>> Send a mail to [EMAIL PROTECTED] with
>> unsubscribe mysql [EMAIL PROTECTED]
>> in the body of the message to unsubscribe from this list.
>-----------------------------------------------------------
>Send a mail to [EMAIL PROTECTED] with
>unsubscribe mysql [EMAIL PROTECTED]
>in the body of the message to unsubscribe from this list.

-----------------------------------------------------------
Send a mail to [EMAIL PROTECTED] with
unsubscribe mysql [EMAIL PROTECTED]
in the body of the message to unsubscribe from this list.

Reply via email to