Strange explain
Hi!
I have a table with the following fields:
varchar(200) title, varchar(200) link, text content
I made an index on the table, named "common", with type fulltext, which contains the title, link, content fields.
When i execute the explain on the following select:
(SELECT *
FROM tdpages
where
match(title, link, content) AGAINST ('abc1') AND match(title, link, content) AGAINST (abc2')AND match(title, link, content) AGAINST ('abc3'))
i get:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE tdpages fulltext common common 0 1 Using where
BUT when i execute explain for this:
(SELECT *
FROM tdpages
where
match(title, link, content) AGAINST ('abc1') AND match(title, link, content) AGAINST ('abc2') OR (match(title, link, content) AGAINST ('abc3')) AND (match(title, link, content) AGAINST ('abc4')) OR (match(title, link, content) AGAINST ('abc5')) AND (match(title, link, content) AGAINST ('abc6')))
i get:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE tdpages ALL NULL NULL NULL NULL 10884 Using where
So the "common" index is not used. why?
Thanks for your answer!