I've been using MySQL fulltext indexes on a table where I keep a
few varchar and one text column that is used for searches. I've
had it defined as:
CREATE TABLE `items_text` ( `item_id` bigint(20) NOT NULL, `fts` varchar(4) NOT NULL default 'grzr', `author` varchar(80) NOT NULL default '', `title` varchar(255) NOT NULL default '', `content` text NOT NULL, PRIMARY KEY (`item_id`), FULLTEXT KEY `title` (`title`), FULLTEXT KEY `author` (`author`), FULLTEXT KEY `fts` (`fts`), FULLTEXT KEY `content` (`content`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
One of my colleagues pointed out he was experiencing slow
performance with this query:
select count(*) from items_text where (MATCH (title, author, content) AGAINST ('+iron +man' IN BOOLEAN MODE))
I ran EXPLAIN just to make sure that the index was being
used:
mysql> explain …[Read more]