MySQL Forums
Forum List  »  Quality Assurance

Problem with INDEX about like
Posted by: xin wu
Date: January 10, 2008 09:57AM

Hello
I have a question for the index on like.

select * from validated_msprefix v, msprefix m where v.invmsp like concat(m.invmsp, '%');

for this statement, I have index on v.invmsp, but when i explain it, it does not use the index. And I know that might be the problem with concat. So i create a column which store the concat result, it still does not use the index. Is that because m.invmsp is a variable? Is there any easy way to slove it?

Thanks very much!!!

Options: ReplyQuote


Subject
Views
Written By
Posted
Problem with INDEX about like
2646
January 10, 2008 09:57AM
2040
January 11, 2008 07:41AM


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.