关于dao层的一个hibernate操作,求解释

zhanganbo zhanganbo 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
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);

像这样我执行一个循环的查询,速度怎么那么慢,有没有什么方法提速一些??坐等。
...全文

相关推荐

评论 4
收藏 已收藏
分享
返回顶部
zhanganbo
Web 开发 81,108 成员 341,721 内容