MySQL query comments in Rails(37signals.com) |
MySQL query comments in Rails(37signals.com) |
One difference though: I prepend the comment instead of appending it.
Otherwise, neat idea, I like it.
As for production, going with a fleshed-out service like NewRelic makes more sense to me. If I see slow queries start happening I'd want a broader report of what's going on in my system, not just a map of the query to a controller/action.
Of course its a trade-off. If you have have substantially more reads than writes than it might be OK for your needs.