DATEDIFF 性能优化10000条数据,循环操作C# codeselect Id,Name,RateDate from Info where ANumber + AN
DATEDIFF 性能优化
10000条数据,循环操作
- C# code
select Id,Name,RateDate from Info where ANumber='" + ANumber + "' and DATEDIFF (s,RateDate,'" + TestDate + "')>0
DATEDIFF 相当耗时,如何解决
[解决办法]
不用 DATEDIFF,直接就拿日期来比就得了。
