MySQL Forums
Forum List  »  Optimizer & Parser

Re: Substring ignores index
Posted by: Denver Vender
Date: February 09, 2007 04:01AM

instead of using a substring that will not use the index

SELECT * mytable WHERE substring(mycolumn,1,8)='12345678'

try using

SELECT * mytable WHERE mycolumn LIKe '12345678%'

if your matching the first few characters..

Options: ReplyQuote


Subject
Views
Written By
Posted
6996
September 29, 2006 08:59AM
3736
September 29, 2006 09:48AM
Re: Substring ignores index
2947
February 09, 2007 04:01AM


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.