Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我执行 TSQL 查询或默认返回大量记录 (1M+) 的存储过程时,它在查询仍在执行时开始显示结果。
有没有办法防止这种情况并推迟返回结果,直到查询执行完成?
如果您在返回的数据集中添加如下所示的列,它几乎肯定无法执行以下操作FAST(N):
FAST(N)
.., MAX(prevColumn) OVER(PARTITON BY 1) As Dummy, ...
prevColumn您已经返回的任何其他列在哪里,特别是如果它不是索引列。
prevColumn
You can use ORDER BY or Aggregate function in SELECT will help you.