MySQL Forums
Forum List  »  Full-Text Search

Re: MATCH AGAINST become slow using *
Posted by: Rick James
Date: July 12, 2011 07:10PM

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 
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

You probably have the default value for...
mysql> SHOW VARIABLES LIKE 'ft_min%';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| ft_min_word_len | 4     |
+-----------------+-------+
Read the online documentation for why that matters, how to change it, etc.

Suggest this change (unrelated to the problem):
and (class='P'
OR code='m'
OR code='PC'
OR code='PCL')
-->
and class IN ('P', 'm', 'PC', 'PCL')

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: MATCH AGAINST become slow using *
1902
July 12, 2011 07:10PM


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.