controller:
for(int i = 10; i < 23; i++){
countList = countInfoDao.hoursDetectList(i,time, path);
}
dao: String sql="select count(distinct clientMac) from PresenceEntity where path like '"+ path +"' and clientType='Uncategorized Device' and timeStamp like '" + time +" "+i+"%' order by timeStamp asc";
return getHibernateTemplate().find(sql);
像这样我执行一个循环的查询,速度怎么那么慢,有没有什么方法提速一些??坐等。