In a large Rails application, it can be tricky to track down where a slow query is coming from in the app.