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

筅森魡賤 提交于 2019-12-12 09:05:22

问题


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

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

Is it something lacking in the Sql Server?


回答1:


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.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/18469918/is-there-any-way-tool-to-identify-estimate-query-run-time-in-sql-server

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