Reputation: 21
The fastest and the best in your opinion search solution for site in PHP/MYSQL is ?
Why this solution ?
Upvotes: 2
Views: 2890
Reputation: 400982
It all depends on :
MySQL Fulltext is not that fast, and not really powerful -- and it forces you to use MyISAM as table engine (InnoDB being probably a better idea, for many situations -- supports transactions, for instance)
Zend Lucene is probably not that fast either ; If I remember correctly, using Zend Lucene is not quite a good idea if you have too many documents (like more than 50,000)
Plain MySQL... You mean using like '%word%' ? That awful, performance-wise : you'll scan each and every lines of your table, each time you're doing a search.
If you really want a great indexing/search solution, you'll probably want to take the time to invest is something else, more specialised, like a specific indexing/searching engine.
As an example, you could take a look at Solr (right now, the website seems to be down), or Sphinx.
Upvotes: 1
Reputation: 26597
It depends on your data, the size of them, the search options, etc.
I think the best is to do your own benchmark with the aforementioned solutions. Or eventually give us more insights in your goals and needs, so we can better help.
I'd say, given the datas, plain mysql will be the faster and Lucene the one with the more flexibility.
Upvotes: 0