-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Background
Currently, query plans can only be downloaded as .sqlplan files and opened in SSMS or another external tool. It would be valuable to render execution plans natively inside the Lite app so users can inspect plans without leaving the tool.
Showplan XML Schema
Microsoft's execution plan XML schema is well-documented:
https://schemas.microsoft.com/sqlserver/2004/07/showplan/
The schema defines the full structure of graphical execution plans including:
RelOpelements (operators) with physical/logical operation types- Cost estimates (
EstimatedTotalSubtreeCost,EstimateRows,EstimateIO,EstimateCPU) - Operator-specific details (seeks, scans, joins, sorts, spools, etc.)
- Parallelism info (actual/estimated DOP, thread distribution)
- Memory grant info, warnings, missing indexes
- Runtime stats when available (actual rows, executions, memory fractions)
Exploration Areas
-
Tree view — simplest starting point. Parse the XML into a hierarchical tree showing operator names, costs, and row estimates. Similar to the text plan output but navigable.
-
Graphical plan — WPF canvas rendering operators as nodes with connecting arrows (right-to-left flow). Arrow thickness proportional to row counts. This is what SSMS does.
-
Warnings and missing indexes — highlight plan warnings (implicit conversions, spills, no join predicate) and surface missing index recommendations prominently.
-
Plan comparison — side-by-side rendering of two plans for the same query hash to spot regressions.
Prior Art
- SQL Sentry Plan Explorer (commercial, WPF-based)
- Brent Ozar's PasteThePlan (web-based)
- The showplan XSD itself is the canonical reference for parsing
Notes
This is exploratory — the scope ranges from a simple tree view (days of work) to a full graphical renderer (weeks). Filing to track interest and gather requirements. Relates to #219 (DuckDB-first plan download) since having plans readily available in DuckDB makes in-app rendering more natural.