prisma-query-optimizer
Query optimization and N+1 detection
When & Why to Use This Skill
The Prisma Query Optimizer is a specialized Claude skill designed to enhance database performance by identifying N+1 query patterns and providing actionable optimization strategies. It helps developers write efficient Prisma queries, implement proper indexing, and select specific fields to reduce latency and resource consumption, ensuring scalable and high-performance backend applications.
Use Cases
- Detecting and resolving N+1 query issues in Prisma-based applications to significantly improve API response times.
- Optimizing database schemas by identifying missing indexes on foreign keys and recommending field-specific selections to minimize data transfer.
- Conducting automated code reviews for database access logic to ensure best practices like pagination and efficient relation fetching are consistently followed.
| name | Prisma Query Optimizer |
|---|---|
| description | Query optimization and N+1 detection |
| version | 1.0.0 |
| category | database |
Prisma Query Optimization Skill
N+1 Detection
Bad: Loop with queries Good: Include relations
Optimization
- Select specific fields
- Add indexes
- Use pagination
Checklist
- No N+1 queries
- Indexes on foreign keys
- Select only needed fields