- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsI have one table with a full text index, and another table to which I need to join, based on an ID field in the fulltext table. I can't get the join query to use non-fulltext table's index to do a ref join; it insists on doing an index scan on the second table. Is there any way to avoid the index scan?
The query is
SELECT
dm.MessageID, sm.DBID
FROM
tdistinctmessages dm,
tSite_messages sm
WHERE MATCH (dm.message) AGAINST ('"microsoft support"' IN BOOLEAN MODE)
AND dm.MessageID=sm.MessageID
Table definitions are:
CREATE TABLE `tdistinctmessages` (
`message` VARCHAR(150) COLLATE latin1_general_ci NOT NULL,
`MessageID` INT(10) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`message`,`MessageID`),
FULLTEXT KEY `FTIX_Message` (`message`)
) ENGINE=MYISAM AUTO_INCREMENT=26935581 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
CREATE TABLE `tsite_messages` (
`DBID` INT(10) NOT NULL,
`wordID` BIGINT(20) UNSIGNED DEFAULT NULL,
`MessageID` INT(10) DEFAULT NULL,
`Repetition` INT(10) NOT NULL DEFAULT '0',
`Emphasis` INT(10) NOT NULL DEFAULT '0',
KEY `IX_DBID_WordID_MessageID_
KEY `NewIndex1` (`MessageID`,`DBID`,`Repet
) ENGINE=MYISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
EXPLAIN IS
possible_keys key key_len ref rows Extra
1 SIMPLE dm fulltext FTIX_Message FTIX_Message 0 1 Using where
1 SIMPLE sm index NewIndex1 NewIndex1 13 \N 27892950 Using where; Using index
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: virmaiorPosted on 2009-11-02 at 16:08:05ID: 25725086
yes...
order matters.
this will use the index:
Select allOpen in new window