MySQL Forums
Forum List  »  Full-Text Search

MATCH AGAINST become slow using *
Posted by: Luca Libonati
Date: July 11, 2011 01:45PM

Hi all,
I'm really not able to sort out this issue.

I have this query that run fast (about 1 second) on a database of 6 million of records:
SELECT *, MATCH(name,surname,alternatenames) AGAINST('+napo*' IN BOOLEAN MODE) FROM names WHERE MATCH(name,surname,alternatenames) AGAINST ('+napo*' IN BOOLEAN MODE) and (class='P' OR code='m' OR code='PC' OR code='PCL') order by population DESC LIMIT 0,10

if i change the query in this way it runs really slowly (117 sec):
SELECT *, MATCH(name,surname,alternatenames) AGAINST('+don +chi*' IN BOOLEAN MODE) FROM names WHERE MATCH(name,surname,alternatenames) AGAINST ('+don +chi*' IN BOOLEAN MODE) and (class='P' OR code='m' OR code='PC' OR code='PCL') order by population DESC LIMIT 0,10

What i expect from this query is to search for people in fields name,surname,alternatenames where the name start with "don chi" and must contain both words.

Could someone help me to sort out this issue?
thanks a lot

Options: ReplyQuote


Subject
Views
Written By
Posted
MATCH AGAINST become slow using *
4405
July 11, 2011 01:45PM


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.