A Rails perf trap that only bites in prod: Active Record leases a connection to the thread on the first query and doesn't hand it back until the request ends. Every HTTP call after that is holding a pool slot.
Your p99 isn't the query. It's other threads waiting on checkout.
