List:General Discussion« Previous MessageNext Message »
From:Balazs Laszlo Date:April 12 2005 8:22am
Subject:explain says: no index is used - however it exists....
View as plain text  
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!
Thread
explain says: no index is used - however it exists....Balazs Laszlo12 Apr