From 64edb1defed866b722d367df645c42ddcb45ceb0 Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Sun, 22 Feb 2026 16:11:59 -0500 Subject: [PATCH] Add Current Active Queries live snapshot view (#149) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dashboard: New "Current Active Queries" sub-tab under Queries that runs dm_exec_requests directly against the server for a live view of running queries. Independent refresh button, column filtering, and query plan download (.sqlplan) from in-memory results. No PerformanceMonitor DB involvement — pure DMV snapshot. Lite: "Live Snapshot" button on Active Queries tab runs the same collector query directly against the server, bypassing DuckDB. Results populate the existing grid with a gold "LIVE at HH:mm:ss" indicator that clears on next auto-refresh. Both: Enhanced query with 5 new columns from dm_exec_sessions — login_name, host_name, program_name, open_transaction_count, percent_complete. Lite schema bumped to v12 with ALTER TABLE migration. Tested on sql2022 and sql2016. Co-Authored-By: Claude Opus 4.6 --- .../Controls/QueryPerformanceContent.xaml | 225 ++++++++++++++++++ .../Controls/QueryPerformanceContent.xaml.cs | 167 +++++++++++++ Dashboard/Models/LiveQueryItem.cs | 45 ++++ .../DatabaseService.QueryPerformance.cs | 114 +++++++++ Lite/Controls/ServerTab.xaml | 24 +- Lite/Controls/ServerTab.xaml.cs | 74 ++++++ Lite/Database/DuckDbInitializer.cs | 21 +- Lite/Database/Schema.cs | 7 +- Lite/Services/LocalDataService.Blocking.cs | 19 +- .../RemoteCollectorService.QuerySnapshots.cs | 51 ++-- 10 files changed, 727 insertions(+), 20 deletions(-) create mode 100644 Dashboard/Models/LiveQueryItem.cs diff --git a/Dashboard/Controls/QueryPerformanceContent.xaml b/Dashboard/Controls/QueryPerformanceContent.xaml index 4691bb1d..65507ef0 100644 --- a/Dashboard/Controls/QueryPerformanceContent.xaml +++ b/Dashboard/Controls/QueryPerformanceContent.xaml @@ -320,6 +320,231 @@ + + + + + + + + + +