是否有任何方法/工具来确定 SQL sERVER 中的估计查询运行时间

我已经在谷歌上搜索了一段时间..有什么方法可以确定估计的查询执行时间>

I have been google about this for a while..is there any way to identify the estimated query execution time>

ssms上有实际的执行计划和估计的执行计划.问题是这些都没有估计时间.

There are actual execution plan and estimated execution plan on the ssms .The thing is none of these have estimated time.

是不是 Sql Server 缺少什么?

Is it something lacking in the Sql Server?

推荐答案

目前没有.微软目前正在研究结合已经完成的工作和估计的执行计划的方法(请参阅他们的研究细节在 Microsoft Research 网站上),所以我们很快就会看到一些东西.但这是我所知道的唯一发展.

Currently, no. Microsoft is currently researching ways to do this using a combination of work already completed and an estimated execution plan (See the details of their research on the Microsoft Research site), so we can expect to see something soon. But this is the only development that I am aware of.

对于需要大量时间的流程,我过去使用最成功的解决方案是将流程分解为更小的任务,并在每个任务结束时设置里程碑.记录每个任务的所有执行的总时间,用于对当前执行的进度进行基准测试.这在很大程度上取决于查询的线性度(即执行时间与记录数成线性比例).里程碑可以通过一个过程的步骤来衡量,也可以通过将数据分成更小的部分来衡量,或者两者兼而有之.

The solution I've used with the most success in the past, for processes that take a lot of time, is to break the process up into smaller tasks, and set milestones at the end of each task. The total time for all executions of each task is recorded, and this is used to benchmark the progress of the current execution. This depends heavily on linearity of your queries (i.e. the time taken to execute is linearly proportional to the number of records). Milestones can either be measured by steps through a process, by breaking the data into smaller segments, or both.

相关文章