Time for first SQL : 21 sec.
SELECT artists.name, cds.title, tracks.title FROM artists, cds, tracks
WHERE artists.artistid = cds.artistid AND artists.artistid =
tracks.artistid AND cds.cdid = tracks.cdid AND MATCH (artists.name)
AGAINST ('madonna'IN BOOLEAN MODE) AND MATCH (cds.title)AGAINST ('"music mix 2001"'IN BOOLEAN MODE)
In this case, it cannot resolve the query JUST using indexes.
After finding all records in the index where artists.name matches madonna and title contains all the words "music", "mix", "2001", then it must retrieve each record, and examine the title field to see if the three words are found together in the phrase.
In your other example, it only needs to use the fulltext indexes to know which records satisfy your query, resulting in MUCH faster query time.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]