ORACLE-查询数据不走索引,同一列='1'走,='2'不走,且数据量均只占总数据量的很小一部分
问题描述:有表A,有索引列a,非索引列b
select count(*) from A where a='1' and b='1';走索引
select count(*) from A where a='2' and b='1';不走索引!!!!
select count(*) from A where a='3' and b='1';走索引!!!!
A中,共有记录600万+;a=‘1’的150条左右,a='2'的3300条左右,a=‘3’的13000条左右;
目前测试了a={20个值左右},只有a='2'的时候不走索引!!!!
求大神指点!!!