![](/img/trans.png)
[英]How to use extended events to track tables used in stored procedures being run
[英]Identity the run time of all the procedures to track the performance
我正在使用 SQL 服务器数据库,我们有 50-80 个存储过程,这些存储过程正在被 .NET 应用程序使用。 但是应用程序非常慢,现在返回结果延迟很大,所以我想确定数据库中运行缓慢的存储过程。
提前致谢。
你看过sys.dm_exec_procedure_stats了吗? 你至少应该从这样的事情开始:
select
isnull(object_name(s.object_id, s.database_id), convert(varchar, object_id)) as name,
s.total_logical_reads,
s.total_worker_time,
s.total_elapsed_time,
s.execution_count,
cached_time,
last_execution_time
from
sys.dm_exec_procedure_stats s
order by
total_worker_time desc
option (recompile)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.