What problem does it solve?
This Skill helps you eliminate common database performance issues like slow queries, excessive memory usage, and inefficient data loading by enforcing proven access patterns for EF Core and Dapper.
Core Features & Use Cases
- Read/Write Separation (CQRS): Design distinct read projections and write commands so queries remain optimized and updates remain validation-focused.
- N+1 and Join Discipline: Prevent N+1 query storms with batching or proper query shaping, and ensure joins happen in SQL rather than application-side filtering.
- Guardrails for Safe Query Shape: Always project only needed columns, apply row limits, use AsNoTracking for read-only EF Core queries, avoid Cartesian explosions, and constrain string sizes.
- Use Case Example: When building an order management feature, use purpose-built read stores for paginated order summaries and Dapper/EF Core projections for detailed views, while keeping writes strict and efficient.
Quick Start
Use the database-performance skill to review your EF Core and Dapper data-access methods and rewrite them to enforce read/write separation, row limits, AsNoTracking on reads, batching to avoid N+1, and SQL-side joins.