Profiles database queries across the codebase, detecting N+1 patterns, missing indexes, full table scans, and inefficient joins. Produces a detailed optimization report with before/after examples.
How this command is triggered — by the user, by Claude, or both
Slash command
/database-query-profiler:profile-queriesThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Database Query Profiler Analyze database queries for performance issues and optimization opportunities. ## Analysis Areas 1. **N+1 Queries**: Detect and fix N+1 query patterns 2. **Missing Indexes**: Identify columns needing indexes 3. **Full Table Scans**: Queries scanning entire tables 4. **Inefficient Joins**: Complex or unnecessary joins 5. **Large Result Sets**: Queries returning excessive data 6. **Query Complexity**: Overly complex SQL queries 7. **Connection Pooling**: Database connection management ## Process 1. Locate all database queries in codebase 2. Analyze query patter...
Analyze database queries for performance issues and optimization opportunities.
Provide detailed report with:
npx claudepluginhub danielmiessler/claude-code-plugins-plus --plugin database-query-profiler4plugins reuse this command
First indexed Dec 31, 2025
/profile-queriesAnalyzes database queries for performance issues like N+1s, missing indexes, and full table scans. Produces a report with optimization recommendations, index statements, and before/after examples.
/queryOptimizes and analyzes queries across SQL databases, MongoDB, Redis, and ORMs: interprets EXPLAIN plans, recommends indexes, rewrites for performance, detects N+1 issues, profiles slow queries. Supports flags like --explain, --indexes, --n-plus-one.
/optimize-queryAnalyzes SQL queries for performance bottlenecks, identifies N+1 queries, missing indexes, and inefficient joins. Outputs rewritten queries and index recommendations.
/prisma-optimizeAnalyzes Prisma queries for N+1 issues, missing indexes, overfetching, and other performance problems, then suggests optimizations from official documentation.
/database-reviewAnalyzes database schemas, query patterns, and data architecture to produce a prioritized optimization plan as a markdown report.
/n-plus-one-finderScans source code for N+1 query patterns in ORM usage (ActiveRecord, SQLAlchemy, Prisma, etc.), identifies inefficient loops and missing eager loading, and produces prioritized code corrections with batch loading fixes.