What problem does it solve?
This Skill identifies and helps resolve common database performance bottlenecks in code, such as N+1 queries, missing indexes, and inefficient transaction handling.
Core Features & Use Cases
- N+1 Query Detection: Identifies and suggests fixes for inefficient loops that trigger multiple database queries.
- Index Optimization: Checks for missing or suboptimal indexes on columns used in WHERE, JOIN, and ORDER BY clauses.
- Transaction Management: Reviews for proper use of transactions to ensure data integrity and prevent deadlocks.
- Connection Pooling: Verifies that connection pooling is configured correctly to handle load efficiently.
- Query Pattern Analysis: Assesses queries for issues like
SELECT * or lack of LIMIT clauses.
- Use Case: When experiencing slow API response times related to database operations, use this skill to pinpoint and fix the underlying query inefficiencies.
Quick Start
Review the database code in the provided file for performance issues and potential optimizations.