is there anyway to speed up mysql like operator performance if wild card is involved? eg. like ‘%test%’
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
MySQL can use an index if your query looks like
foo LIKE 'abc%'orfoo LIKE 'abc%def%'. It can use the index for any portion or the string before the first wildcard. If you need to match a word anywhere within a string, you might want to consider usingFULLTEXTindexes instead.More detail on indexes: http://dev.mysql.com/doc/refman/5.1/en/mysql-indexes.html
Full text search: http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html