Skip to content

Add 7-day time filter to drill-down queries (#165)#179

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/drill-down-query-perf
Feb 19, 2026
Merged

Add 7-day time filter to drill-down queries (#165)#179
erikdarlingdata merged 1 commit intodevfrom
feature/drill-down-query-perf

Conversation

@erikdarlingdata
Copy link
Owner

Summary

  • All three drill-down windows fetched ALL historical data with no time limit
  • Busiest queries had 3776 rows, each carrying ~10KB plan XML (~37MB transfer)
  • Added collection_time >= DATEADD(DAY, -7, SYSDATETIME()) to all three queries
  • Reduces result sets to ~672 rows max (~7MB), making drill-down windows responsive

Test plan

  • Double-click a query in Query Store tab, verify drill-down loads quickly
  • Double-click a procedure in Procedure Stats tab, verify drill-down loads quickly
  • Double-click a query in Query Stats tab, verify drill-down loads quickly
  • Verify chart and grid populate with 7 days of data

🤖 Generated with Claude Code

All three drill-down windows (Query Store, Query Stats, Procedure Stats)
fetched ALL historical data with no time limit — up to 3776 rows per
query, each carrying ~10KB of plan XML. Added 7-day time filter to
collection_time on all three queries to keep result sets manageable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 31bb939 into dev Feb 19, 2026
@erikdarlingdata erikdarlingdata deleted the feature/drill-down-query-perf branch February 19, 2026 23:37
erikdarlingdata added a commit that referenced this pull request Feb 20, 2026
…ing, aggregate by collection_time

- Remove query_plan_text/query_plan from drill-down SELECT queries (was loading 122 MB inline, hanging the app)
- Add on-demand plan fetch methods for all three drill-down types
- Pass parent view's time range (hoursBack/fromDate/toDate) through to drill-down queries
- Aggregate query_stats drill-down by collection_time with MAX for cumulative counters (matches report.query_stats_summary pattern)
- Aggregate query_store drill-down by collection_time + plan_id with weighted averages
- Remove broken 7-day DATEADD filter from PR #179 that prevented drill-downs from returning data
- Fix Download button: increase RowHeight 30->35, remove stale IsEnabled binding, async on-demand fetch
- Fix DefaultTraceContent/CurrentConfigContent StaticResource -> DynamicResource for theme support
- Add upgrade script for memory_stats columns (1.2.0 -> 1.3.0)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
erikdarlingdata added a commit that referenced this pull request Feb 20, 2026
…ing, aggregate by collection_time (#189)

- Remove query_plan_text/query_plan from drill-down SELECT queries (was loading 122 MB inline, hanging the app)
- Add on-demand plan fetch methods for all three drill-down types
- Pass parent view's time range (hoursBack/fromDate/toDate) through to drill-down queries
- Aggregate query_stats drill-down by collection_time with MAX for cumulative counters (matches report.query_stats_summary pattern)
- Aggregate query_store drill-down by collection_time + plan_id with weighted averages
- Remove broken 7-day DATEADD filter from PR #179 that prevented drill-downs from returning data
- Fix Download button: increase RowHeight 30->35, remove stale IsEnabled binding, async on-demand fetch
- Fix DefaultTraceContent/CurrentConfigContent StaticResource -> DynamicResource for theme support
- Add upgrade script for memory_stats columns (1.2.0 -> 1.3.0)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant