I have a basic table :
create table fullTextTest
(
id INT(11) NOT NULL,
superText CHAR(255) NOT NULL,
superLongText TEXT NOT NULL,
primary key (`id`),
FULLTEXT KEY `superText` (`superText`),
FULLTEXT KEY `superLongtext` (`superLongtext`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into fullTextTest
set id=1,
superText="Hi guys, how is it goin'?",
superLongtext="Please give me some dummy text to search on!!!"
;
show index from fullTextTest;
| fullTextTest | 0 | PRIMARY | 1 | id | A | 1 | NULL | NULL | | BTREE | |
| fullTextTest | 1 | superText | 1 | superText | NULL | NULL | NULL | NULL | | FULLTEXT | |
| fullTextTest | 1 | superLongtext | 1 | superLongText | NULL | NULL | NULL | NULL | | FULLTEXT | |
Now , let's see if MySQL is using this index correctly :
EXPLAIN select * from fullTextTest where match(superText) AGAINST ("guys" IN BOOLEAN MODE);
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+--------------+----------+---------------+-----------+---------+------+------+-------------+
| 1 | SIMPLE | fullTextTest | fulltext | superText | superText | 0 | | 1 | Using where |
The "Using Where" shows me that EXPLAIN don't understand FULLText.. Which is a shame, really.
Did I miss something ?