Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/check-pr-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check pull request target branch
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- edited
jobs:
check-branches:
runs-on: ubuntu-latest
steps:
- name: Check branches
env:
HEAD_REF: ${{ github.head_ref }}
BASE_REF: ${{ github.base_ref }}
run: |
if [ "$HEAD_REF" != "dev" ] && [ "$BASE_REF" == "main" ]; then
echo "::error::Pull requests to main are only allowed from dev. Please target the dev branch instead."
exit 1
fi
48 changes: 48 additions & 0 deletions .github/workflows/check-version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Check version bump
on:
pull_request:
branches: [main]

jobs:
check-version:
if: github.head_ref == 'dev'
runs-on: ubuntu-latest

steps:
- name: Checkout PR branch
uses: actions/checkout@v4

- name: Get PR version
id: pr
shell: pwsh
run: |
$version = ([xml](Get-Content src/PlanViewer.App/PlanViewer.App.csproj)).Project.PropertyGroup.Version | Where-Object { $_ }
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
Write-Host "PR version: $version"

- name: Checkout main
uses: actions/checkout@v4
with:
ref: main
path: main-branch

- name: Get main version
id: main
shell: pwsh
run: |
$version = ([xml](Get-Content main-branch/src/PlanViewer.App/PlanViewer.App.csproj)).Project.PropertyGroup.Version | Where-Object { $_ }
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
Write-Host "Main version: $version"

- name: Compare versions
env:
PR_VERSION: ${{ steps.pr.outputs.VERSION }}
MAIN_VERSION: ${{ steps.main.outputs.VERSION }}
run: |
echo "Main version: $MAIN_VERSION"
echo "PR version: $PR_VERSION"
if [ "$PR_VERSION" == "$MAIN_VERSION" ]; then
echo "::error::Version in PlanViewer.App.csproj ($PR_VERSION) has not changed from main. Bump the version before merging to main."
exit 1
fi
echo "✅ Version bumped: $MAIN_VERSION → $PR_VERSION"
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

on:
pull_request:
branches: [main]
types: [closed]

permissions:
contents: write

jobs:
create-release:
if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'dev'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Get version
id: version
shell: pwsh
run: |
$version = ([xml](Get-Content src/PlanViewer.App/PlanViewer.App.csproj)).Project.PropertyGroup.Version | Where-Object { $_ }
echo "VERSION=$version" >> $env:GITHUB_OUTPUT

- name: Check if release already exists
id: check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if gh release view "v${{ steps.version.outputs.VERSION }}" > /dev/null 2>&1; then
echo "EXISTS=true" >> $GITHUB_OUTPUT
else
echo "EXISTS=false" >> $GITHUB_OUTPUT
fi

- name: Create release
if: steps.check.outputs.EXISTS == 'false'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "v${{ steps.version.outputs.VERSION }}" \
--title "v${{ steps.version.outputs.VERSION }}" \
--generate-notes \
--target main
52 changes: 49 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,50 @@ A cross-platform SQL Server execution plan analyzer with built-in MCP server for

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.

![Query Editor](screenshots/Query%20Editor.png)

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

![Actual Execution Plan](screenshots/Actual%20Execution%20Plan.png)

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

![Navigate Stored Procedure Statements and Plans](screenshots/Navigate%20Stored%20Procedure%20Statements%20and%20Plans.png)

### Operator Tooltip and Properties
Hover over any operator for a detailed tooltip with costs, rows, I/O, timing, parallelism, and warnings. Click to open the full properties panel with per-thread timing, predicates, and more.

![Operator Tooltip](screenshots/Actual%20Execution%20Plan%20With%20Warning%20Tool%20Tip.png)

![Operator Properties](screenshots/Operator%20Properties.png)

### Advice for Humans
One-click text report with server context, warnings, wait stats, and expensive operators — ready to read or share.

![Advice for Humans](screenshots/Advice%20For%20Humans.png)

### Plan Comparison
Side-by-side comparison of two plans showing cost, runtime, I/O, memory, and wait stat differences.

![Plan Comparison](screenshots/Plan%20Comparison.png)

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

![Query Store Integration](screenshots/Query%20Store%20Integration.png)

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

![MCP Integration](screenshots/MCP%20Integration.png)

## What It Does

Feed it a query plan and it tells you what's wrong:
Expand Down Expand Up @@ -260,7 +304,7 @@ A VSIX extension that adds **"Open in Performance Studio"** to the execution pla

### Installation

1. Download both `PlanViewer.Ssms.vsix` and `InstallSsmsExtension.exe` from the [latest release](https://github.com/erikdarlingdata/PerformanceStudio/releases)
1. Download `PlanViewer.Ssms.vsix` and `InstallSsmsExtension.exe` from the [v0.7.0 release](https://github.com/erikdarlingdata/PerformanceStudio/releases/tag/v0.7.0) (SSMS extension is not yet included in automated builds)
2. Place them in the same folder
3. Double-click `InstallSsmsExtension.exe` and approve the UAC prompt
4. The installer auto-detects SSMS 21 and/or SSMS 22 and installs into both
Expand Down Expand Up @@ -293,7 +337,7 @@ The desktop GUI includes an embedded [Model Context Protocol](https://modelconte
2. Register with Claude Code:

```
claude mcp add --transport streamable-http --scope user performance-studio http://localhost:5152/
claude mcp add --transport http --scope user performance-studio http://localhost:5152/
```

3. Open a new Claude Code session and ask questions like:
Expand Down Expand Up @@ -433,4 +477,6 @@ Rules can be disabled or have their severity overridden via a `.planview.json` c

## License

MIT
MIT — see [LICENSE](LICENSE).

Execution plan operator icons are from Microsoft's [vscode-mssql](https://github.com/microsoft/vscode-mssql) extension (MIT). See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for details.
49 changes: 49 additions & 0 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Third-Party Notices

Performance Studio includes the following third-party open-source components. Each component is subject to the license terms specified below.

---

## vscode-mssql (Execution Plan Icons)

**Author**: Microsoft Corporation
**Repository**: https://github.com/microsoft/vscode-mssql
**License**: MIT License

Execution plan operator icons (PNG) from the vscode-mssql extension are used to render graphical execution plans. Icons are located in `src/PlanViewer.Core/Resources/PlanIcons/`.

### License Text

MIT License

Copyright (c) Microsoft Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Full license: https://github.com/microsoft/vscode-mssql/blob/main/LICENSE

---

## Acknowledgments

Performance Studio uses execution plan operator icons from **Microsoft's vscode-mssql extension**, which provides SQL Server tooling for Visual Studio Code. We are grateful for their commitment to open-source software.

---

*Last Updated: March 5, 2026*
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/Actual Execution Plan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/Advice For Humans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/MCP Integration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/Operator Properties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/Plan Comparison.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/Query Editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/Query Store Integration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/PlanViewer.App/Mcp/McpInstructions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ 4. Use plan analysis tools above with the returned session_ids
{
"mcpServers": {
"performance-studio": {
"type": "streamable-http",
"type": "http",
"url": "http://localhost:5152/"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/PlanViewer.App/PlanViewer.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<Version>0.8.0</Version>
<Version>0.8.1</Version>
<Authors>Erik Darling</Authors>
<Company>Darling Data LLC</Company>
<Product>Performance Studio</Product>
Expand Down
2 changes: 1 addition & 1 deletion src/PlanViewer.Cli/PlanViewer.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Nullable>enable</Nullable>
<RootNamespace>PlanViewer.Cli</RootNamespace>
<AssemblyName>planview</AssemblyName>
<Version>0.8.0</Version>
<Version>0.8.1</Version>
<Authors>Erik Darling</Authors>
<Company>Darling Data LLC</Company>
<Product>Performance Studio</Product>
Expand Down
Loading