经典指数          
原因
2893
浏览数
0
收藏数
 

mysql数据库中一张user表中,其中包含字段A,B,C,字段类型如下:A:int,B:int,C:int根据字段A,B,C按照ABC顺序建立复合索引idx_A_B_C,以下查询语句中使用到索引idx_A_B_C的语句有哪些?
  • select *from user where A=1 and B=1
  • select *from user where 1=1 and A=1 and B=1
  • select *from user where B=1 and C=1
  • select *from user where A=1 and C=1

     举报   纠错  
 
切换
1 个答案
因复合索引为idx_A_B_C,所以查询条件只能是在a,ab,abc,ac才算 使用到索引idx_A_B_C
 
切换
撰写答案
扫描后移动端查看本题