Postmortem: tracking down a slow API endpoint in production

A customer reported that one dashboard endpoint was taking over two seconds to respond under normal load, while every other endpoint was fast.
We started with request tracing, which pointed to a single database query responsible for almost all of the latency.
The query was doing a full table scan on a join condition that had no supporting index — easy to miss because the table was small in staging but large in production.
Adding the right composite index brought the response time down to under 80ms. The real lesson: test performance-sensitive queries against production-sized data, not staging fixtures.
More in Blog
BlogBuilding a design system from scratch: a practical blog post
Lessons from building a small, consistent design system for a client product without over-engineering it.
BlogWhy we moved a client's codebase to a monorepo (and when we wouldn't)
Monorepos solve real problems, but they're not free. Here's how we decide when it's worth the migration.