DM是一样支持位图索引的,试验如下
drop table t purge;
create table t
as
select rownum name_id,
decode(ceil(dbms_random.value(0,2)),
1,‘M’,
2,‘F’)gender,
ceil(dbms_random.value(1,50)) location,
decode(ceil(dbms_random.value(0,3)),
1,‘child’,
2,‘young’,
3,‘middle_age’,
4,‘old’) age_group,
rpad(’’,400,’’) data
from dual
connect by rownum<=100000;
explain select *
from t
where gender=‘M’
and location in (1,10,30)
and age_group=‘child’;
SQL> explain select *
2 from t
3 where gender=‘M’
4 and location in (1,10,30)
5 and age_group=‘child’;
1 #NSET2: [16, 4, 190]
2 #PRJT2: [16, 4, 190]; exp_num(6), is_atom(FALSE)
3 #HASH RIGHT SEMI JOIN2: [16, 4, 190]; n_keys(1)
4 #CONST VALUE LIST: [0, 3, 30]; row_num(3), col_num(1),
5 #SLCT2: [15, 62, 190]; (T.GENDER = ‘M’ AND T.AGE_GROU