MySQL Forums
Forum List  »  Optimizer & Parser

Re: Optimizing Substring Query
Posted by: Björn Steinbrink
Date: May 02, 2006 02:59PM

You don't need to concat then. You can split your search-string into two constants and use that to search on both fiels, using a compound index to speed up the process.

... WHERE name = SUBSTRING_INDEX(<SEARCH_TERM>, '/', 1) AND man = SUBSTRING_INDEX(<SEARCH_TERM>, '/', -1)

Options: ReplyQuote


Subject
Views
Written By
Posted
6113
May 02, 2006 01:01PM
1984
May 02, 2006 02:39PM
2623
May 02, 2006 02:45PM
Re: Optimizing Substring Query
2436
May 02, 2006 02:59PM
1777
May 02, 2006 03:00PM


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.