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.
刚刚在我们的回归过程中遇到了一个奇怪的行为,其中一个存储过程输出了数千条记录:
如果存储过程在短时间内被调用超过 20 次,则可以使用相同的参数以不同的顺序输出结果。
有人对这种行为有任何想法吗?
由于某种原因,我们无法在存储过程中明确指定顺序。
并行查询计划听起来可能是罪魁祸首(或在不同的运行中使用不同的查询计划)。
如果您没有使用 明确订购ORDER BY,则无法保证订购。
ORDER BY
您可以发布存储过程和查询计划吗?