Home / Market / sql optimization patterns

sql optimization patterns

Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.

skill★ 507520 dlgithubCC-BY-4.0 content; MIT code; upstream exceptions applyInstall in CosmosUpstream Source

Documentation & Preview

--- name: sql-optimization-patterns description: "Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data." risk: critical source: community date_added: "2026-02-27"

---

SQL Optimization Patterns

Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.

Use this skill when

Do not use this skill when

Instructions

Resources

Limitations

Worked example

The playbook includes an executable SQLite batch-loading example with bound values and an empty-input case. The repository test exercises it alongside pagination ties and aggregation equivalence. SQLite correctness checks do not establish PostgreSQL performance or production safety.