# 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](https://gcformat.com) 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](https://dotnet.microsoft.com/download/dotnet/10.0) (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](https://github.com/erikdarlingdata/PerformanceStudio/releases/latest) page: | Platform | Download | |----------|----------| | Windows (x64) | [PerformanceStudio-win-x64.zip](https://github.com/erikdarlingdata/PerformanceStudio/releases/latest/download/PerformanceStudio-win-x64.zip) | | macOS (Apple Silicon) | [PerformanceStudio-osx-arm64.zip](https://github.com/erikdarlingdata/PerformanceStudio/releases/latest/download/PerformanceStudio-osx-arm64.zip) | | macOS (Intel) | [PerformanceStudio-osx-x64.zip](https://github.com/erikdarlingdata/PerformanceStudio/releases/latest/download/PerformanceStudio-osx-x64.zip) | | Linux (x64) | [PerformanceStudio-linux-x64.zip](https://github.com/erikdarlingdata/PerformanceStudio/releases/latest/download/PerformanceStudio-linux-x64.zip) | 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: ```bash 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. ```bash 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. ```bash dotnet tool install --tool-path ./tools PerformanceStudio.Cli --version| Free code signing on Windows provided by SignPath.io, certificate by SignPath Foundation |