当前位置:Gxlcms > 数据库问题 > 执行sql 时间

执行sql 时间

时间:2021-07-01 10:21:17 帮助过:6人阅读

SELECT TOP 10 --eq.*,
total_worker_time/execution_count AS Avg_CPU_Time
,execution_count
,total_elapsed_time/execution_count as AVG_Run_Time,creation_time ,last_execution_time,last_elapsed_time/1000
,(SELECT
SUBSTRING(text,statement_start_offset/2,(CASE
WHEN statement_end_offset = -1 THEN LEN(CONVERT(nvarchar(max), text)) * 2 
ELSE statement_end_offset 
END -statement_start_offset)/2
) FROM sys.dm_exec_sql_text(sql_handle)
) AS query_text 
FROM sys.dm_exec_query_stats eq where creation_time > ‘2017-06-09 04:41:17.307‘
ORDER BY Avg_CPU_Time DESC

  https://stackoverflow.com/questions/36056475/azure-sql-frequent-connection-timeouts

执行sql 时间

标签:out   logs   nvarchar   varchar   top   sub   string   desc   .com   

人气教程排行