laravel-database-optimization
Installation
SKILL.md
Laravel Database Optimization
Use this skill when improving query performance, reviewing migrations, debugging slow pages, or reducing memory and database load in Laravel apps.
This skill coordinates existing performance skills and adds an optimization workflow.
Priority Order
- Prove the bottleneck with logs, query inspection, profiling,
EXPLAIN, tests, or realistic data volume. - Fix query shape before adding infrastructure: eager loading, constraints, selective columns, aggregates, pagination, and bounded datasets.
- Add indexes that match actual filters, joins, sorts, and uniqueness rules.
- Cache only stable or expensive work with explicit invalidation.
- Review transaction scope, lock behavior, and retry strategy for write-heavy paths.
- Plan migrations with production data size and lock risk in mind.