ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  MySQL FULLTEXT Searching
Subject:   Fulltext seach and joins
Date:   2004-10-12 13:32:23
From:   johnv8
In one of the queries above there is a join in the same clause as the fulltext search. This works in theory but as soon as you start using real databases you will run into significantly long queries when you do something like
FROM fulltext_table AS FT
INNER JOIN other_table AS OT ON OT.id = FT.id
MATCH(FT.text) AGAINST ('search_string') LIMIT 1000

Even small databases of 2-4 million rows often take 2-3 minutes in computing this.

Disclaimer before you bash this:
yes, the rows are indexed and optimized. This occured on a fast server (dual processor 2Ghz, 2Gb ram). There are ways to make it fast but the example above will be painfully slow if you have a large DB.

1 to 1 of 1
1 to 1 of 1