假设有这样的索引 indx1(id,user,passwd)
覆盖索引会被用到:
1.SELECT id,user,passwd FROM t1 WHERE id=?
2.SELECT id,user,passwd FROM t1 WHERE id=? AND user=?
3.SELECT id,user,passwd FROM t1 WHERE id=? AND passwd=?
4.SELECT id,user,passwd FROM t1 WHERE passwd=? AND id=?
用到部分覆盖索引:
1.SELECT id,user FROM t1 WHERE id=?ORDER BY passwd;
2.SELECT id,user FROM t1 WHERE id=? ORDER BY user;