Is there any way/tool to identify estimate query run time in SQL sERVER

两盒软妹~` 提交于 2019-12-04 13:15:38
Peter

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.

The only way you can estimate query execution time by actually running the query. And even after that if may differ next time as it depends on lots of factors like how busy is your server, or many processes are trying to access that table or the quantity of data you are trying to access.

SQL Server doesn't estimate execution time.

Estimated query cost used to be misleadingly equated in the documentation as estimated time in seconds (for features such as query governor ) but it is really just a unitless value.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!