联合索引 Posted on 2019-02-19 Edited on 2024-05-30 In database key当具备多个索引的时候,如:KEY 联合索引 (a,b,c)为索引,除(b,c)条件索引不会触发该索引表外,(a,b),(a,c),(a,b,c)均会触发上述联合索引,具体可参见explain的key类型,理论应该显示联立索引 如: EXPLAIN SELECT * FROM TABLENAME WHERE a=’2222’ AND b=‘222’ 如果你设置多个单列索引,在explain下,key的值就为其单列的索引,如上述的a列