SET STATISTICS TIME ON不会给出一致的执行时间。 [英] SET STATISTICS TIME ON does not give consistent execution time.
本文介绍了SET STATISTICS TIME ON不会给出一致的执行时间。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用SET STATISTICS TIME ON来查找一组SQL查询的执行时间。每次执行查询时,我都会得到不同的执行时间。
我在每次执行前清除了Cache。但是我仍然没有得到一致的执行时间。我第一次执行查询并获得39毫秒的总执行时间。但是下次我执行相同的查询时,我得到了486ms的执行时间。我不确定我是否以错误的方式解释它。
我该怎么办?
解决方案
请使用SQL事件探查器检查每个查询的确切时间..
I used SET STATISTICS TIME ON to find the execution time of a set of SQL queries. Each time i execute the query, i get a different execution time.
I cleared Cache before each execution. But still i don''t get a consistent Execution time. The first time i executed the query and got 39ms as the total execution time. But the next time i executed the same set of queries i got 486ms as execution time. i''m not sure if i''m interpreting it in the wrong way.
What should i do?
解决方案
Please use SQL Profiler to check exact time taken for each query..
这篇关于SET STATISTICS TIME ON不会给出一致的执行时间。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文