开发者

Best practices for index/fulltext when using WHERE/LIKE

开发者 https://www.devze.com 2023-02-18 14:29 出处:网络
Should I set the columns to in my table as index or fulltext? They w开发者_C百科ill be searched for both using WHERE and WHERE .. LIKE.

Should I set the columns to in my table as index or fulltext? They w开发者_C百科ill be searched for both using WHERE and WHERE .. LIKE.

Which is best?


Full-text searches require different syntax from normal LIKE queries. If you're using LIKE queries (and don't plan on modifying them) you will only get a benefit from using nonclustered indexes. If you are interested in using full-text search, consider using the MATCH() syntax in your queries. http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html

0

精彩评论

暂无评论...
验证码 换一张
取 消