MySQL Forums
Forum List  »  Performance

Re: String match is too slow in huge table
Posted by: Peter Zaitsev
Date: December 31, 2004 07:38PM

You've already got "use full text search" advice which might work well for your case, I would just ecplain what is happening in this case.

The problem is you're having like "const%" on both surname and name. In such case even though you have index on (name,surname) MySQL will only be able to use prefix of the first key, as second key part only can be used if
"=" is used for first key part at this point.

First idea would be to use have (surname) index instead which is normally more sellective.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: String match is too slow in huge table
2958
December 31, 2004 07:38PM


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.