我尝试在 linq 查询之前使用秒表并在 LINQ 查询之后停止它,但 linq 查询的时间需要 2 分钟,但 stopwtach 结果给出 40 MS !
这是 LINQ 查询
Stopwatch stopwatch = Stopwatch.StartNew();
var sets =
from a in patient
from b in patient
from c in patient
from d in patient
from l in patient
where a.VisitNum < b.VisitNum && b.VisitNum < c.VisitNum && c.VisitNum < d.VisitNum && d.VisitNum < l.VisitNum
select new { a, b, c, d, l };
stopwatch.Stop();
有什么建议吗?