什么是针对PHP&的最佳搜索算法? MYSQL? [英] What is the best search Algorithm for PHP & MYSQL?

查看:64
本文介绍了什么是针对PHP&的最佳搜索算法? MYSQL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想搜索我网站上的文章- 可以只使用简单的"LIKE"语句,还是可以在MySQL中使用更好的搜索算法? (重要的是要有效率)

I want to make a search for articles on my website - is it ok to use just plain 'LIKE' statement or is there a better search algorithm to use with MySQL? (its important it be efficient)

推荐答案

您应该使用 MySQL LIKE与全文之间的权衡

You should look into using Full-Text Search.
It might also help you to read about the Tradeoffs of MySQL LIKE vs Full-Text

这篇关于什么是针对PHP&的最佳搜索算法? MYSQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆