在默认值为null或包含null的列上使用索引会产生什么影响

时间:2014-11-06 14:55:30

标签: mysql

explain extended SELECT * FROM application WHERE 
email = 'abcd@gmail.com';

这个解释扩展产生以下结果我已经在电子邮件领域应用了适当的索引并且其默认值为null。我想知道为什么它扫描3行而不是1.任何人都可以解释??

id, select_type, table, type, possible_keys, key, key_len, ref,rows, filtered, Extra
'1', 'SIMPLE', 'application', 'ref', 'idx_email', 'idx_email',
 '258', 'const', '3', '100.00', 'Using where with pushed condition(`db`.`application`.`email` = \'abcd@gmail.com\')'

解释扩展

0 个答案:

没有答案