diff --git a/Dashboard/Services/DatabaseService.QueryPerformance.cs b/Dashboard/Services/DatabaseService.QueryPerformance.cs index c1b3f6e6..b13913d6 100644 --- a/Dashboard/Services/DatabaseService.QueryPerformance.cs +++ b/Dashboard/Services/DatabaseService.QueryPerformance.cs @@ -748,6 +748,7 @@ FROM report.query_stats_summary AS qs OR (qs.last_execution_time >= @fromDate AND qs.last_execution_time <= @toDate) OR (qs.first_execution_time <= @fromDate AND qs.last_execution_time >= @toDate))) ) + AND qs.query_text NOT LIKE N'WAITFOR%' ORDER BY qs.avg_worker_time_ms DESC;"; @@ -989,6 +990,7 @@ FROM report.query_store_summary AS qss OR (qss.last_execution_time >= @fromDate AND qss.last_execution_time <= @toDate) OR (qss.first_execution_time <= @fromDate AND qss.last_execution_time >= @toDate))) ) + AND qss.query_sql_text NOT LIKE N'WAITFOR%' ORDER BY qss.avg_cpu_time_ms DESC OPTION diff --git a/Lite/Services/LocalDataService.QueryStats.cs b/Lite/Services/LocalDataService.QueryStats.cs index dabb04e9..78b4ab51 100644 --- a/Lite/Services/LocalDataService.QueryStats.cs +++ b/Lite/Services/LocalDataService.QueryStats.cs @@ -69,6 +69,7 @@ FROM query_stats WHERE server_id = $1 AND collection_time >= $2 AND collection_time <= $3 +AND query_text NOT LIKE 'WAITFOR%' GROUP BY database_name, query_hash ORDER BY SUM(delta_elapsed_time) DESC LIMIT $4"; diff --git a/Lite/Services/LocalDataService.QueryStore.cs b/Lite/Services/LocalDataService.QueryStore.cs index 65a52f70..f02fe78f 100644 --- a/Lite/Services/LocalDataService.QueryStore.cs +++ b/Lite/Services/LocalDataService.QueryStore.cs @@ -47,6 +47,7 @@ FROM query_store_stats WHERE server_id = $1 AND collection_time >= $2 AND collection_time <= $3 +AND query_text NOT LIKE 'WAITFOR%' GROUP BY database_name, query_id, plan_id, query_hash ORDER BY SUM(execution_count) * AVG(avg_duration_ms) DESC LIMIT $4";