Skip to content
Back to skills

Sql Optimization

ASecurity

Investigate a slow SQL query from query text, schema, execution plan, statistics, and workload evidence.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 13, 2026
ai-agentssqldatabase

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 13, 2026

npx -y skills add z-Zihan/Evir --skill sql-optimization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sql Optimization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sql Optimization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/z-zihan-sql-optimization/badge)](https://www.skillsdirectory.com/skills/z-zihan-sql-optimization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sql-optimization
description: Investigate a slow SQL query from query text, schema, execution plan, statistics, and workload evidence.
---

# SQL Optimization

1. Establish the database engine/version, query, parameters, data volume, latency baseline, concurrency, and correctness constraints.
2. Require an execution plan or clearly label all conclusions as hypotheses. Do not optimize from formatting or intuition alone.
3. Locate the dominant cost: scans, joins, sorts, spills, row-estimate error, contention, network transfer, or repeated execution.
4. Consider query shape, index design, statistics, partitioning, batching, caching, and application access patterns in that order.
5. Evaluate write cost, storage, lock behavior, plan stability, and rollback for every index or schema proposal.
6. Compare before/after with identical parameters and workload conditions; verify result equivalence.

Return baseline, ranked hypotheses, smallest safe experiment, expected tradeoffs, verification commands, and rollback.

Files in this skill

  • SKILL.md1 KB
  • manifest.json1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.