List:General Discussion« Previous MessageNext Message »
From:Andrew Brosnan Date:August 31 2005 11:10am
Subject:Help optimizing Fulltext query
View as plain text  
Hello,

I need some help optimizing a query. The current query is as follows:

  SELECT *,
  MATCH(title) AGAINST ( 'S' IN BOOLEAN MODE ) AS score
  FROM articles
  WHERE MATCH(title) AGAINST ( 'S' IN BOOLEAN MODE );


'title' is a FULLTEXT index.
'S' is a query string that may have 100 search terms.
'articles' table has about 100,000 records.

The query runs OK (< 0.1 sec) as long as 'S' is small (< 5 terms), but
as the number of terms increase, it bogs down big-time.

EXPLAIN says:
*************************** 1. row ***************************
        table: articles
         type: fulltext
possible_keys: art_ft
          key: art_ft
      key_len: 0
          ref: 
         rows: 1
        Extra: Using where
1 row in set (0.00 sec)

Any suggestions?

Regards,
Andrew
Thread
Help optimizing Fulltext queryAndrew Brosnan31 Aug
  • Re: Help optimizing Fulltext queryBrent Baisley31 Aug