gpt4 book ai didi

sql-server-2008 - SQL Server 2008 事件监视器

转载 作者:行者123 更新时间:2023-12-04 07:21:09 24 4
gpt4 key购买 nike

在查看 SQL Server 中的事件监视器时,我注意到在“最近昂贵的查询”选项卡下,“执行次数/分钟”列似乎比应有的数字高得多。
这个数字实际上是什么意思?从字面上看,SQL 查询在一分钟内执行了多少次,还是这个数字代表其他东西?
在此先感谢您的帮助!

最佳答案

您正在分析的“昂贵的查询”可能正在使用其他子查询(假设为 10)。那么您的“执行次数/分钟”计数可能高出 10 倍吗?由于为每个子查询重新编译执行计划?

找到这个答案 here :

The Execution/Min means the executions per minute for the query, the execution_count column in sys.dm_exec_query_stats indicates the number of times that the plan has been executed since it was last compiled. It is normal that the value of execution_count is not equal to the Execution/Min, since if the execution plan of your query recompiled or regenerated during execution, then the execution_count will be reset to 0 and recount. For instance, if this insert statement included into a transaction block, then the execution plan’s recompile might be caused by the other statement’s execution plan recompiled, so the execution_count will be reset to 0 and recount.

Please refer to the below links for more detail information:

sys.dm_exec_query_stats: http://msdn.microsoft.com/en-us/library/ms189741.aspx Activity Monitor: http://msdn.microsoft.com/en-us/library/cc879320(v=SQL.100).aspx



谢谢,乔伟林

关于sql-server-2008 - SQL Server 2008 事件监视器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13651096/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com