• sqlserver 查看最耗时的前10个存储过程


    SELECT TOP 10 OBJECT_NAME(a.object_id,database_id) SP_Name, DB_NAME(a.database_id) Database_Name, a.cached_time, a.last_execution_time, a.total_elapsed_time, 
    a.total_elapsed_time/a.execution_count AS [avg_elapsed_time], a.execution_count, a.total_physical_reads/a.execution_count avg_physical_reads, 
    a.total_logical_writes, a.total_logical_writes/ a.execution_count avg_logical_reads, a.last_elapsed_time, 
    a.total_elapsed_time / a.execution_count avg_elapsed_time, b.text,c.query_plan 
    FROM sys.dm_exec_procedure_stats AS a CROSS APPLY sys.dm_exec_sql_text(a.sql_handle) b 
    CROSS APPLY sys.dm_exec_query_plan(a.plan_handle) c ORDER BY [total_worker_time] DESC;
  • 相关阅读:
    进程、线程
    listview
    Jquery小知识点
    Jquery
    ling查询
    linq
    登陆状态显示
    母版页
    js的触发方式
    js
  • 原文地址:https://www.cnblogs.com/osbreak/p/9767509.html
Copyright © 2020-2023  润新知