mssql-performance-revi…
Agentic offline orchestrator for end-to-end SQL Server performance reviews. Forms hypotheses from artifacts or symptoms, dispatches the specialised review…
Parse and analyze SQL Server SET STATISTICS IO, TIME ON output. Extracts per-table IO metrics and per-statement CPU/elapsed times, computes % logical read share, detects 27 performance patterns (I1–I18 IO checks, W1–W9 time checks). Use when a user pastes SSMS statistics output
$ npx -y skills add vanterx/mssql-performance-skills --skill sqlstats-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sqlstats-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Parse and analyze SQL Server SET STATISTICS IO, TIME ON output. Extracts per-table IO metrics and per-statement CPU/elapsed times, computes % logical read share, detects 27 performance patterns (I1–I18 IO checks, W1–W9 time checks). Use when a user pastes SSMS statistics output
name: sqlstats-review description: Parse and analyze SQL Server SET STATISTICS IO, TIME ON output. Extracts per-table IO metrics and per-statement CPU/elapsed times, computes % logical read share, detects 27 performance patterns (I1–I18 IO checks, W1–W9 time checks). Use when a user pastes SSMS statistics output or asks why a query does too much I/O. triggers: - /sqlstats-review - /stats-review - /stats-io
Parse raw `SET STATISTICS IO, TIME ON` output from SQL Server Management Studio and produce a structured report of I/O activity and timing per statement. Applies 27 checks across IO patterns (I1–I18) and time patterns (W1–W9) to surface performance concerns that the raw output obscures.
This is the IO/time complement to `sqlplan-review`. Run it when you have STATISTICS output but no execution plan, or alongside the plan to cross-reference what actually happened at the I/O layer.
Accept any of:
The input may contain mixed content — IO lines, time lines, rows-affected messages, error messages, and unrelated output. Parse only the recognized patterns; preserve unrecognized lines as informational context.
Table 'TableName'. Scan count X, logical reads Y, physical reads Z, read-ahead reads A, lob logical reads B, lob physical reads C, lob read-ahead reads D.
Optional additional fields (appear in Azure SQL or columnstore workloads):
Special table names: `Worktable` (sort spill, e.g. ORDER BY, hash aggregate spool), `Workfile` (hash spill, e.g. hash join/aggregate build input), names starting with `#` (explicit temp tables).
SQL Server parse and compile time: CPU time = 108 ms, elapsed time = 108 ms. SQL Server Execution Times: CPU time = 156527 ms, elapsed time = 284906 ms.
(13431682 row(s) affected)
Msg 207, Level 16, State 1, Line 1 Invalid column name 'scores'.
Completion time: 2025-05-27T10:32:37.8122685-04:00
---
1. **Parse**: Split input on newlines. Classify each line as: IO, ExecutionTime, CompileTime, RowsAffected, Error, CompletionTime, or Info. 2. **Group into statements**: Consecutive IO lines belong to the same statement group. A non-IO line (time, rows-affected, error) separates groups. 3. **Compute per-statement totals**: Sum all IO metrics within each statement group. Compute `% Logical Reads` for each table: `(table_logical / group_total_logical) × 100` to 3 decimal places. If total logical = 0, leave blank. 4. **Detect summary time rows**: If a time row's elapsed ≈ (compile_elapsed + execution_elapsed) ± 5 ms, mark it as a summary row and exclude it from running totals. Note: "Summary row detected — not added to totals." 5. **Compute grand totals**: Accumulate IO metrics across all statement groups. Merge rows for the same table name. Sort the grand total table alphabetically by table name. 6. **Run checks I1–I15 and W1–W7**: Evaluate each check against parsed data. Report triggered checks in the findings section. 7. **Output**: Produce the structured report defined in Output Format.
---
| Metric | Value | |--------|-------| | High logical reads (statement) — warning | ≥ 1,000,000 | | High logical reads (statement) — critical | ≥ 10,000,000 | | High scan count — warning | ≥ 1,000 | | High scan count — critical | ≥ 10,000 | | High physical read ratio | physical / logical ≥ 10% | | LOB reads dominant | lob_logical / logical ≥ 50% | | Read-ahead scan indicator | read_ahead / logical ≥ 80% AND logical ≥ 10,000 | | Single-table dominance — warning | one table ≥ 80% of statement logical reads | | Single-table dominance — critical | one table ≥ 95% of statement logical reads | | Columnstore low skip rate | skipped / (reads + skipped) < 50% | | Elapsed time — warning | execution_elapsed ≥ 30,000 ms | | Elapsed time — critical | execution_elapsed ≥ 300,000 ms | | CPU time — warning | execution_cpu ≥ 60,000 ms | | I/O wait indicator | cpu < 10% of elapsed | | Parallelism indicator | cpu > 150% of elapsed | | High compile overhead | compile_cpu > 20% of execution_cpu AND compile_elapsed ≥ 200 ms | | Zero-return high-read | rows_affected = 0 AND statement logical reads ≥ 10,000 |
---
Evaluate per-statement and per-table IO metrics.
SQL Server performance tuning skills for LLMs — 829 checks across 26 skills covering T-SQL, execution plans, wait stats, deadlocks, Query Store, indexes, encryption, Always On AG, WSFC, ERRORLOG, SPN, memory, disk I/O, config drift, setup logs, SSRS & migration readiness. Remote MCP server on Cloudflare Workers.
Repo: vanterx/mssql-performance-skills
Agentic offline orchestrator for end-to-end SQL Server performance reviews. Forms hypotheses from artifacts or symptoms, dispatches the specialised review…
Audits SQL Server Always On Availability Group configuration correctness across all layers — prerequisites, replica design, listener architecture, backup…
Analyze SQL Server Setup Bootstrap log files to diagnose failed installations, failed Cumulative Update or Service Pack patching, failed cluster node…
Analyzes Windows Server Failover Cluster (WSFC) CLUSTER.LOG files for Always On Availability Group root-cause diagnosis. Use this skill when an availability…
Analyze SQL Server instance and database configuration drift against proven DBA best practices. Applies 29 checks (B1–B29) across five categories: parallelism…
Analyze SQL Server deadlock XML (from system_health XE session, SSMS deadlock graph, or trace) to identify root cause and produce a prioritized remediation…