Performance tuning
Find N+1 queries, cache hot paths, and keep p95 under control.
Measure before you optimize. Atlas exposes query logging, route timing, and cache hit ratios so you can find the real bottleneck.
Photo by Luke Chesser on Unsplash.
Quick wins
- Cache config and routes in production.
- Eager-load relationships you render in lists.
- Paginate every unbounded collection.
- Move email and PDF generation to queues.
Inspect queries
bashterminal
php atlas telescope:install
php atlas serve
# open /atlas/telescope and reproduce the slow pageDanger
A single N+1 in a table of 50 rows often costs more than your entire controller. Fix relationships first.
| Signal | Healthy | Investigate |
|---|---|---|
| p95 latency | under 300 ms | over 800 ms |
| Queries / request | under 15 | over 40 |
| Cache hit ratio | over 90% | under 60% |
Updated Aug 5, 2026
