db-query-optimization

Installation
SKILL.md

DB Query Optimization

Overview

Use this skill to improve query performance based on execution evidence, not intuition.

Scope Boundaries

  • Hot-path latency or database CPU/IO usage is query-bound.
  • Query plans are unstable across parameter distributions.
  • Workload changes expose previously acceptable query anti-patterns.

Core Judgments

  • Dominant bottleneck: scan cost, join explosion, sort spill, lock wait, network round trips.
  • Rewrite scope: query shape, index changes, schema adjustment, or materialization.
  • Plan stability and parameter-sensitivity risk.
  • Correctness risk from aggressive rewrite or approximation.

Practitioner Heuristics

  • Start from actual execution plans and runtime metrics.
  • Optimize the highest-impact query families, not one-off outliers.
Related skills

More from kentoshimizu/sw-agent-skills

Installs
5
GitHub Stars
5
First Seen
Feb 28, 2026