I have the following table:
 
> CREATE TABLE `Article_Search` (
> `ArticleID` int(11) NOT NULL default '0',
> `Content` text NOT NULL, 
> PRIMARY KEY (`ArticleID`),
> FULLTEXT KEY `Content` (`Content`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1

 This table has several million rows, but I only want to search a subset of 
the table. IE:
 SELECT * FROM Article_Search WHERE MATCH(Content) AGAINST('"rubber 
duckies"' IN BOOLEAN MODE) AND ArticleID IN (100, 23, 223, 98, 4018, 1452, 
91)
 The reason I'm specifying a set of ArticleIDs is that I know any hits are 
going to be within those articles. So the presence of the IN() clause is 
purely there for performance. However, an explain on this Statement shows 
that it is using the Full-Text index. Is mysql text-searching the entire 
table under the hood, or does it use the PK to reduce the dataset before the 
text-search. 
 Thanks again!
 -Dan

Reply via email to