我要做统计报表,但数据量很大,为了提升速度,现在对表建索引。第一个统计
select * from Hrb0502 where a is not null
and b like cutzero('360424101000')||'%'
and c between to_date('2012-01', 'yyyy-mm') 第二个统计
select * from
Hrb0502
where
a like '360424101%'
and d like '444%'
and c >= to_date('2012-01-01','yyyy-mm-dd')现在我已经对第二个统计建了一个索引
create index IDX on HRB0502(a,d,c)第一个统计还要不要对第一个统计建索引呢?
select * from Hrb0502 where a is not null
and b like cutzero('360424101000')||'%'
and c between to_date('2012-01', 'yyyy-mm') 第二个统计
select * from
Hrb0502
where
a like '360424101%'
and d like '444%'
and c >= to_date('2012-01-01','yyyy-mm-dd')现在我已经对第二个统计建了一个索引
create index IDX on HRB0502(a,d,c)第一个统计还要不要对第一个统计建索引呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货