如果一张表中有a,b,c三个字段

建立了联合索引 index(a,b,c)其实相当于创建了index(a),index(a,b),index(a,b,c)三个索引    疑问index(a,c)是否创建了吗?结果发现index(a,c)和index(a)key_len一样。所以没有index(a,c)

在写SQL时,并不分那个字段在前:

如: select * from table where a=1 and b=2 and c=3 和 select * from table where b=2 and a=1 and c=3 这两条语句都用了索引index(a,b,c)。

转载于:https://my.oschina.net/u/3576777/blog/3007504