Help us improve
Share bugs, ideas, or general feedback.
From role-database
Optimizes queries across PostgreSQL, MySQL, MongoDB, Cassandra, ClickHouse using EXPLAIN/ANALYZE, index strategies (B-tree, GIN, covering), N+1 fixes, cursor pagination, and slow query diagnosis.
npx claudepluginhub rnavarych/alpha-engineer --plugin role-databaseHow this skill is triggered — by the user, by Claude, or both
Slash command
/role-database:query-optimizationThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Load from `references/` based on what's needed:
Analyzes slow queries in PostgreSQL, MySQL, MongoDB using EXPLAIN plans, buffer stats, index usage to detect sequential scans, missing indexes, and recommend optimizations.
Optimizes PostgreSQL and MySQL queries through indexing strategies, EXPLAIN analysis, N+1 detection, and connection pooling.
Masters SQL query optimization, indexing strategies, and EXPLAIN analysis to eliminate slow queries. Use when debugging slow queries, designing schemas, or improving database performance.
Share bugs, ideas, or general feedback.
Load from references/ based on what's needed:
EXPLAIN analysis for PostgreSQL (red flags, buffer hit ratio), MySQL (type column, FORMAT=TREE), MongoDB (executionStats, COLLSCAN vs IXSCAN), ClickHouse (system.query_log). Index type comparison table (B-tree, Hash, GIN, GiST, BRIN, partial, covering). Composite index design rules (equality first, range last, selectivity order). Partial indexes and covering indexes with INCLUDE. Statistics and cardinality management. Load when: analyzing query plans, designing indexes, or fixing stale statistics.
N+1 detection via pg_stat_statements, elimination patterns (eager load, DataLoader, window functions). Offset vs cursor-based pagination with multi-column cursor example. Materialized views: creation, blocking vs concurrent refresh, automated refresh strategies. Query anti-patterns: SELECT *, functions on indexed columns, correlated subqueries, implicit type conversions, missing LIMIT. Load when: fixing N+1 problems, implementing pagination, or eliminating slow query patterns.