MySQL Forums
Forum List  »  Newbie

Strange explain
Posted by: balazslaci83
Date: April 11, 2005 11:54AM

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!

Options: ReplyQuote


Subject
Written By
Posted
Strange explain
April 11, 2005 11:54AM


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.