![]() |
#2
jianghong_022010-12-07 08:26
|
数据库sql Server 2000,通过count(*)来获取指定时间段内记录的条数,但离当前时间越近的时间段,查询的速度越慢,查询的时间越长。例如:今天2010-12-6,执行语句:"select count(*) from tablea where date_time>'2010-10-3' and date_time<'2010-12-7'"速度非常快,但如果查询
"select count(*) from tablea where date_time>'2010-12-6' and date_time<'2010-12-7'"速度就非常慢,请高手指教,这是什么原因啊?