有什么方法/工具可以识别 SQL sERVER 中的估计查询运行时间 [英] Is there any way/tool to identify estimate query run time in SQL sERVER

查看:30
本文介绍了有什么方法/工具可以识别 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.

这篇关于有什么方法/工具可以识别 SQL sERVER 中的估计查询运行时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆