应用不等于(!= 或 <>)时无奈应用索引而应用全表扫描。
EXPLAIN SELECT * FROM staffs WHERE `name` != 'July';
EXPLAIN SELECT * FROM staffs WHERE `name` <> 'July';
应用 is null, is not null 时无奈应用索引而应用全表扫描。
EXPLAIN SELECT * FROM staffs WHERE `name` is null;
EXPLAIN SELECT * FROM staffs WHERE `name` is not null;
应用 OR 做查问时无奈应用索引而应用全表扫描。
EXPLAIN SELECT * FROM staffs WHERE `name` = 'July' OR `name` = 'Sumi';