MySQL Forums
Forum List  »  Newbie

Re: Using Regular Expressions in WHERE and its effect on indexes
Posted by: Jay Pipes
Date: July 27, 2005 12:19AM

No, LIKE will use an index, if one is available on the id column. Also, if more than a certain number of records out of the total number of records in mytable is returned from the expression, MySQL will opt to simply do a table scan, as this will be faster.

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster? http://www.mysql.com/cluster
Personal: http://jpipes.com

Options: ReplyQuote


Subject
Written By
Posted
Re: Using Regular Expressions in WHERE and its effect on indexes
July 27, 2005 12:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.