MySQL Forums
Forum List  »  Full-Text Search

COUNT query is slow using Multiple MATCH AGAINST with OR operator
Posted by: venkata surreddy
Date: January 07, 2011 11:05AM

Hi All,

I am working on boolean search engine feature using Full text search. For results pagination purpose I am using COUNT query before retrieving actual search results.

The query is fast when AND operator is between MATCH AGAINST and taking 0.03 sec
-- SELECT count(id) search_count FROM performance_search WHERE MATCH(AuthorNames) AGAINST ('david*' IN BOOLEAN MODE) and MATCH(JournalArticleTitle,JournalArticleAbstract) AGAINST ('safe*' IN BOOLEAN MODE) --

But the query is too slow when OR operator is between MATCH AGAINST and taking 7.89 sec
-- SELECT count(id) search_count FROM performance_search WHERE MATCH(AuthorNames) AGAINST ('david*' IN BOOLEAN MODE) or MATCH(JournalArticleTitle,JournalArticleAbstract) AGAINST ('safe*' IN BOOLEAN MODE) --

Any ideas how to improve the query speed when OR operator comes into picture...

Regards,
Venkata Surreddy

Options: ReplyQuote


Subject
Views
Written By
Posted
COUNT query is slow using Multiple MATCH AGAINST with OR operator
5850
January 07, 2011 11:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.