database-query-optimizer
CommunityOptimize database queries, eliminate N+1 issues.
Software Engineering#indexing#PostgreSQL#Prisma#eager loading#SQL optimization#database optimization#N+1 query
AuthorMaciWP
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill identifies and resolves common database performance bottlenecks, such as slow queries, N+1 problems, and missing indexes, ensuring your applications run faster and more efficiently.
Core Features & Use Cases
- N+1 Query Detection & Fixes: Automatically find and eliminate inefficient N+1 query patterns using eager loading (JOINs) in ORMs like SQLAlchemy or Prisma.
- Index Suggestions: Analyze query plans and recommend optimal database indexes to speed up
WHERE,ORDER BY, andJOINclauses. - Use Case: Analyze a slow API endpoint that fetches users and their associated posts, then optimize the query to fetch all data in a single database hit, or interpret
EXPLAIN ANALYZEoutput to pinpoint performance issues.
Quick Start
Analyze the following SQLAlchemy query for N+1 problems and suggest eager loading: users = db.query(User).all(); for user in users: print(user.posts).
Dependency Matrix
Required Modules
PostgreSQLMySQLMongoDBRedisSQLAlchemyPrismaTypeORMMongooseDrizzle
Components
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: database-query-optimizer Download link: https://github.com/MaciWP/CV_Astro/archive/main.zip#database-query-optimizer Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.