SQL语句中就只加了三个sum计算和几个参数,运行速度就很慢了,大概需要45秒才可以运行出来 具体语句: select VALIAS,sum(F),sum(P),sum(G),TJSJ from KTJJL2 WHERE 1=1 ${IF(LEN(起始日期)=0,""," AND TJSJ >='"+起始日期+"'")} ${if(len(结束日期)=0,""," and TJSJ<='"+结束日期+"'")} ${if(len(设备)=0,""," and VALIAS in ('"+设备+"')")} group by TJSJ,VALIAS order by TJSJ |