Skip to content

aouellets/database-performance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Database Performance & Administration

For backend engineers: make slow queries fast and keep production Postgres healthy. — built in-house by Skill Me.

Reach for this when a production database is slow or strained and you need a verifiable fix, not folklore. It walks the real diagnose-to-resolve path: catch N+1s in your ORM, read an EXPLAIN plan down to the bottleneck node, advise the right index, rewrite pathological SQL, decide when to partition, size connection pools, ship migrations with zero-downtime locking, and chase down stale reads from replica lag. Every fix is EXPLAIN-checkable, so you ship the change knowing it actually moved the number.

If this is useful, star the repo — it's how we gauge what to build next.

Install

  • From the catalog: skillme.dev/pack/database-performance — install the whole pack into Claude in one step.
  • With the skills CLI: npx skills add aouellets/database-performance
  • Manually: copy any skills/<slug>/SKILL.md into your Claude skills directory.

Skills in this pack

  • N+1 Query Hunter — Detect ORM loop-of-queries (N+1) patterns from query logs and eliminate them with batched eager loading, keeping the N+1s that are cheap.
  • EXPLAIN Plan Reader — Read a captured EXPLAIN ANALYZE plan, name the single bottleneck node, and prescribe a targeted fix for it.
  • Index Advisor — Recommends, orders, and prunes indexes for a specific query or table — composite column order, partial and covering indexes, duplicate/unused cleanup, and write-cost tradeoffs.
  • SQL Query Rewriter — Rewrites a structurally inefficient SQL query into a faster equivalent that returns byte-identical results — correlated subqueries to joins or LATERAL, accidental cross joins to explicit ON predicates, OR-across-columns to UNION, SELECT * to projected columns, and deep OFFSET pagination to keyset.
  • Table Partition Planner — Produces a partitioning or sharding plan for an oversized table — range/list/hash strategy, partition-key choice, composite-key and pruning constraints, and a verdict on whether to partition at all.
  • Connection Pool Tuner — Diagnoses connection pool exhaustion from captured evidence and sets correct pool sizes and timeouts across app pools and PgBouncer.
  • Migration Safety Checker — Rewrite a schema migration into independently deployable, zero-downtime steps that never take a long-held blocking lock on a live table.
  • Replication Lag Debugger — Diagnoses read-replica lag and the stale-read bugs it causes, then applies read-after-write consistency strategies to fix them.

License

MIT — see LICENSE. Skills are portable SKILL.md files; the canonical copies live in the Skill Me catalog.

About

Make slow queries fast and keep your database healthy under load.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors