2

The fastest and the best in your opinion search solution for site in PHP/MYSQL is ?

  1. MYSQL FULLTEXT
  2. ZEND LUCENE
  3. PLAIN MYSQL
  4. OTHER SOLUTION

Why this solution ?

2
  • 2
    Do you have a sample table of what you would like to search? Commented Mar 3, 2011 at 11:24
  • the best is SQL Server, see this to to watch how easy you can do a thesaures/inflection search in any language Commented Mar 3, 2011 at 11:28

2 Answers 2

1

It all depends on :

  • The amout of data you have
  • The complexity of those data
  • The number of search you'll be doing (is fulltext search a major feature of your application ? Or something that will rarely be used ? )
  • The features you want ? Only search ? Or more advanced stuff ?


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.

Sign up to request clarification or add additional context in comments.

1 Comment

or NOSQL for those who have large amounts of data
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.