← Files SQL CopilotARCHIVED FILE

skills/sql-performance-review/SKILL.md

1.68 KB · Nov 14, 2026 · 00:41 UTC

↓ Download file

See the change to this file →

---
name: sql-performance-review
description: Diagnose SQL runtime and resource cost using plans, profiles and actual workload data.
---

# Sql Performance Review

**Trigger:** Diagnose SQL runtime and resource cost using plans, profiles and actual workload data.

## Workflow
1. First confirm correctness and a stable baseline: dataset size, parameters, row counts, query duration, bytes/scans, workload concurrency.
2. Ask for or inspect plan/profile when available. Separate I/O, join fanout/shuffle, spill, sorting, skew, blocking and concurrent contention.
3. Rank changes by likely benefit and risk: projection, early filtering when semantics allow, prune-friendly predicates, staged aggregation and access-path improvements.
4. Avoid generic index, cluster, VACUUM, OPTIMIZE, hint, CTE or warehouse-size prescriptions without platform evidence.
5. Compare correctness and performance after each isolated change; report observations versus hypothesized improvements.

## Critical standard
A faster query is not a win if it changes results, ignores cold/warm cache, or increases total cost.

## Evidence and execution
Only say "executed", "passed", "observed", "optimized" or "deployed" when a connected tool returned evidence for that claim. An SQL draft, a textual review, or local fixture proof alone is not production validation. Never ask the user to paste passwords or raw confidential records.

## Supporting references
- Read `../../references/performance-diagnosis.md` when relevant.
- Read `../../references/official-docs.md` when relevant.
- Read `../../references/original/sql_performance_patterns.md` when relevant.

## Return
Evidence summary, prioritized interventions, before/after measurement plan.

SHA-256: 1f6c427823050c7ed17b2b8bfdf3d65e04911de61a971f3db2861746f3e773b3