diff --git a/Dashboard/Services/DatabaseService.NocHealth.cs b/Dashboard/Services/DatabaseService.NocHealth.cs index e5125e3d..c1f59887 100644 --- a/Dashboard/Services/DatabaseService.NocHealth.cs +++ b/Dashboard/Services/DatabaseService.NocHealth.cs @@ -623,6 +623,8 @@ CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) AS t JOIN sys.dm_exec_sessions AS s ON s.session_id = r.session_id WHERE r.session_id > 50 AND r.total_elapsed_time >= @thresholdMs + AND t.text NOT LIKE N'%waitfor delay%' + AND t.text NOT LIKE N'%waitfor receive%' ORDER BY r.total_elapsed_time DESC OPTION(MAXDOP 1, RECOMPILE);"; diff --git a/Lite/Services/LocalDataService.WaitStats.cs b/Lite/Services/LocalDataService.WaitStats.cs index 46994844..f7f1a313 100644 --- a/Lite/Services/LocalDataService.WaitStats.cs +++ b/Lite/Services/LocalDataService.WaitStats.cs @@ -218,6 +218,8 @@ FROM v_query_snapshots AND collection_time = (SELECT MAX(collection_time) FROM v_query_snapshots WHERE server_id = $1) AND session_id > 50 AND total_elapsed_time_ms >= $2 +AND query_text NOT LIKE '%waitfor delay%' +AND query_text NOT LIKE '%waitfor receive%' ORDER BY total_elapsed_time_ms DESC LIMIT 5";