2012-09-05 44 views
-1
CREATE TABLE `words_data` (
    `id` int(11) NOT NULL auto_increment, 
    `words` varchar(50) default '', 
    `pid` int(8) default '0', 
    `baiyephp` int(11) default '0', 
    PRIMARY KEY (`id`), 
    KEY `baiyephp` (`baiyephp`), 
    KEY `words` (`words`), 
    KEY `pid` (`pid`), 
    KEY `pid_id` (`id`,`pid`) 
) ENGINE=MyISAM AUTO_INCREMENT=1961736 DEFAULT CHARSET=utf8 

EXPLAIN语句存在键:explain select id from words_data where pid=232632;但没有possible_keys并没有在列列键。没有可用possible_keys,但在where子句

回答

0

解释收益率在我的测试环境:

Impossible WHERE noticed after reading const tables 

这似乎表明,在该表中没有数据具有pid = 232632

+0

是,在表中的PID = 232632没有数据,但是有一些行的pid = 260009,也没有possible_keys和没有键。 – yuhai