Skip to content

Explore native query plan rendering #220

@erikdarlingdata

Description

@erikdarlingdata

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:

  • RelOp elements (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

  1. 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.

  2. 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.

  3. Warnings and missing indexes — highlight plan warnings (implicit conversions, spills, no join predicate) and surface missing index recommendations prominently.

  4. Plan comparison — side-by-side rendering of two plans for the same query hash to spot regressions.

Prior Art

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions