1.在date上建有一非个群集索引 select count(*) from record where date > ''19991201'' and date < ''19991214''and amount > 2000 (25秒) select date,sum(amount) from record group by date (55秒) select count(*) from record where date > ''19990901'' and place in (''BJ'',''SH'') (27秒)
2.在date上的一个群集索引 select count(*) from record where date > ''19991201'' and date < ''19991214'' and amount > 2000 (14秒) select date,sum(amount) from record group by date (28秒) select count(*) from record where date > ''19990901'' and place in (''BJ'',''SH'')(14秒)
3.在place,date,amount上的组合索引 select count(*) from record where date > ''19991201'' and date < ''19991214'' and amount > 2000 (26秒) select date,sum(amount) from record group by date (27秒) select count(*) from record where date > ''19990901'' and place in (''BJ, ''SH'')(< 1秒)
4.在date,place,amount上的组合索引 select count(*) from record where date > ''19991201'' and date < ''19991214'' and amount > 2000(< 1秒) select date,sum(amount) from record group by date (11秒) select count(*) from record where date > ''19990901'' and place in (''BJ'',''SH'')(< 1秒)