Performance Studio
A cross-platform SQL Server execution plan analyzer with built-in MCP server for AI-assisted analysis. Parses .sqlplan XML, identifies performance problems, suggests missing indexes, and provides actionable warnings — from the command line or a desktop GUI.
Built for developers and DBAs who want fast, automated plan analysis without clicking through SSMS.
Screenshots
Query Editor
Write queries with syntax highlighting and SQL keyword completion, connect to any SQL Server, and capture plans with one click.

Actual Execution Plan with Plan Insights
Graphical plan tree with SSMS-style operator icons, cost percentages, row counts, and warning badges. The Plan Insights panel shows runtime summary, missing indexes, parameters, and wait stats at a glance.

Multi-Statement Navigation
Navigate stored procedures and batches with multiple statements. Click any statement in the grid to jump to its plan. Plan Insights shows parameters with compiled vs runtime values.

Operator Tooltip and Properties
Hover any operator for a grouped tooltip with costs, rows, timing, and parallelism. Click for the full properties panel, which has a filter box and folds per-thread stats into one expander per section instead of hundreds of rows.


Advice for Humans
Severity-scored cards for each statement: the warnings that fired, wait stats, memory grant, and missing indexes. Copy to clipboard gives you the plain-text version to paste into a ticket.

Plan Comparison
A real metric diff. Each statement is scored as regressed or improved, every metric carries its own delta chip, and the direction that counts as better is declared per metric rather than guessed from the sign.

Query Store Integration
Fetch top queries by CPU, duration, logical reads, physical reads, writes, memory, or executions from Query Store and load their plans directly into the analyzer.

Minimap and colored links by accuracy ratio divergence
The minimap provides a high-level overview of the entire plan, allowing you to quickly navigate to areas of interest. Colored links between operators indicate accuracy ratio divergence, helping you identify where estimates are most off from actuals.

MCP Integration
Ask Claude Code to analyze loaded plans, identify warnings, suggest indexes, and compare plans — all through the built-in MCP server.

Compact output (GCF)
Set PLANVIEWER_OUTPUT_FORMAT=gcf to have the MCP server return tool results as GCF instead of JSON. GCF factors the repeated field names of record-heavy results (Query Store plan lists, connection and statement listings) into a single header, so a model spends roughly a third fewer tokens reading them. The substitution is opt-in and conservative: a result is re-encoded only when the wire is both smaller than the JSON and decodes back to the same value, so anything it cannot losslessly shrink is returned as the original JSON.
What It Does
Feed it a query plan and it tells you what's wrong:
- Large memory grants — flags queries hoarding memory they don't use
- Row estimate mismatches — finds operators where estimates are 10x+ off from actuals
- Missing indexes — extracts SQL Server's index suggestions with ready-to-run CREATE statements
- Hash, sort, and exchange spills — identifies operators spilling to TempDB with severity based on volume
- Parallel skew — detects threads doing all the work while others sit idle
- Scan predicates — warns when scans filter rows with residual predicates
- Key and RID lookups — flags lookups back to the base table, distinguishes heaps from clustered indexes
- Late filters — finds Filter operators discarding rows deep in the plan
- Nested loop concerns — flags high-execution nested loops that might be better as hash joins
- Parameter sniffing — compares compiled vs runtime parameter values
- Scalar UDFs — warns about T-SQL and CLR scalar functions in execution paths
- Implicit conversions — detects type mismatches, upgrades severity when a seek plan is prevented
- Anti-patterns — OPTIMIZE FOR UNKNOWN, NOT IN with nullable columns, leading wildcards, function-wrapped predicates, and more
Each warning includes severity (Info, Warning, or Critical), the operator node ID, and enough context to act on immediately.
Prerequisites
- .NET 10 SDK (only needed to build from source — the pre-built binaries below are self-contained and require no SDK)
- SQL Server instance (optional — only needed for live plan capture; file analysis works without one)
- Docker (optional — macOS/Linux users can run SQL Server locally via Docker)
Download
Pre-built binaries are available on the Releases page:
These are self-contained — no .NET SDK required. Extract the zip and run.
macOS note: macOS may block the app because it isn't signed with an Apple Developer certificate. If you see a warning that the app "can't be opened," run this after extracting:
xattr -cr PerformanceStudio.app
Then open the app normally.
Install the CLI
The planview command is a .NET tool on nuget.org. It needs the .NET 10 runtime.
dotnet tool install -g PerformanceStudio.Cli
planview analyze --help
For a CI pipeline, install into a folder and pin the version. A dotnet-tools.json manifest works too.
dotnet tool install --tool-path ./tools PerformanceStudio.Cli --version <version>
./tools/planview analyze plan.sqlplan --compact
To update:
dotnet tool update -g PerformanceStudio.Cli
Build from Source
Clone and build:
git clone https://github.com/erikdarlingdata/PerformanceStudio.git
cd PerformanceStudio
dotnet build
To verify the build:
dotnet test PlanViewer.sln
dotnet run --project src/PlanViewer.Cli -- analyze --help
Quick Start
Analyze an existing .sqlplan file
If you already have a .sqlplan file (saved from SSMS, Azure Data Studio, or another tool):
# JSON output (default) — full operator tree, suitable for automation
planview analyze my_query.sqlplan
# Human-readable text output
planview analyze my_query.sqlplan --output text
# Text output, warnings and missing indexes only (skip operator tree)
planview analyze my_query.sqlplan --output text --warnings-only
Explore plans interactively (Repl pilot)
Run planview repl to start a long-lived plan-exploration session. Zero arguments and the
existing analyze, query-store, and credential commands continue to use the legacy
System.CommandLine graph.
planview repl
> open slow-query.sqlplan
[plan slow-query-<opaque-id>]> summary
[plan slow-query-<opaque-id>]> warnings --severity critical
[plan slow-query-<opaque-id>]> operators --top 10
[plan slow-query-<opaque-id>]> missing-indexes --json
[plan slow-query-<opaque-id>]> close
The same graph also works in one-shot and MCP modes:
planview plan open slow-query.sqlplan --json --no-logo
planview repl # explicit interactive alias
planview mcp serve # stdio MCP server generated from the graph
Bare planview preserves the legacy System.CommandLine behavior. Interactive exploration is
entered only through planview repl; scripts can use explicit legacy or one-shot plan commands.
The pilot uses the stable Repl 0.11.0 release. Loaded plans live only for the lifetime of
the process; open and close change only that in-memory catalog and never write the
source plan. MCP plan_open validates and reads the same opened file handle inside client
roots, accepts only .sqlplan files, and uses the server launch directory only when native
roots are unsupported and no soft roots exist. Advertised empty roots deny access. MCP and
local mode share the 16 MiB file/2-concurrent-open/32-session resource limits. See
docs/repl-pilot.md for architecture, security, and compatibility notes.
Capture and analyze plans from a live server
Connect to a SQL Server instance, run queries, and capture their execution plans automatically.
Quickest way — pass credentials directly:
# Capture an actual execution plan (the query WILL run)
planview analyze --server sql2022 --database AdventureWorks \
--login sa --password YourPassword \
--query "SELECT * FROM Sales.SalesOrderHeader WHERE OrderDate > '2024-01-01'" \
--trust-cert --output-dir ./results/
# Capture an estimated plan (safe for production — query is NOT executed)
planview analyze --server sql2022 --database AdventureWorks \
--login sa --password YourPassword \
--query "SELECT * FROM Sales.SalesOrderHeader" \
--estimated --trust-cert --output-dir ./results/
Using a .env file — drop a .env in your working directory to avoid repeating connection details:
# .env
PLANVIEW_SERVER=sql2022
PLANVIEW_DATABASE=AdventureWorks
PLANVIEW_LOGIN=sa
PLANVIEW_PASSWORD=YourPassword
PLANVIEW_TRUST_CERT=true
Then just run:
planview analyze --query "SELECT * FROM Sales.SalesOrderHeader"
planview analyze ./queries/ --output-dir ./results/
CLI arguments override .env values when both are provided.
When the .env file supplies a setting, the CLI prints one line to stderr. The line names the file and those settings, and it never shows their values:
Using settings from /work/.env: PLANVIEW_SERVER, PLANVIEW_TRUST_CERT
The CLI takes a setting from the file only when the setting has an effect:
- With no server from either place,
analyze reads the plan file offline and takes nothing from the .env file.
PLANVIEW_PASSWORD is used only with a login.
PLANVIEW_TRUST_CERT in the file turns off certificate validation only for a server that the file names. For a server that you give with --server, the CLI ignores it and prints a line to stderr. Pass --trust-cert to turn validation off for that server.
A .env file that holds a password stays out of git. On Linux and macOS, only you can read it (chmod 600 .env), and the CLI prints a warning if other users can read it.
If a PLANVIEW_ value holds a control character, the CLI stops and names the setting. The CLI prints the server and database names later. A control character in them moves the cursor and erases text, such as the Using settings line.
Using the credential store — for longer-term use, store credentials in your OS keychain: