首页 > 代码库 > 执行sql 时间

执行sql 时间

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,(SELECTSUBSTRING(text,statement_start_offset/2,(CASEWHEN 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 时间