MySQL Forums
Forum List  »  Full-Text Search

Which Performs Better?
Posted by: Michael Lawson
Date: August 20, 2015 05:07PM

I have three fields defined as fulltext: name, address, city

I know they likely are not equivellent, but which performs better?

A)
INDEX name FULLTEXT on name
INDEX address FULLTEXT on address
INDEX city FULLTEXT on city
SELECT * FROM TABLE
WHERE MATCH(name) AGAINST ('QUERY' IN BOOLEAN MODE)
OR MATCH(address ) AGAINST ('QUERY' IN BOOLEAN MODE)
OR MATCH(city) AGAINST ('QUERY' IN BOOLEAN MODE)

-OR-

B)
INDEX name_address_city FULLTEXT on name, address, city
SELECT * FROM TABLE
WHERE MATCH(name, address, city) AGAINST ('QUERY' IN BOOLEAN MODE)

Options: ReplyQuote


Subject
Views
Written By
Posted
Which Performs Better?
1335
August 20, 2015 05:07PM
662
August 22, 2015 01:07PM


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.