With a platform that serves millions of people every day, we have a number of services that need to query MySQL. GitHub.com is a large Rails application with a lot of queries generated though ActiveRecord.
Occasionally we will get a slow query appear in our exception tracker Haystack:
I’ve mentioned previously that we tag queries so we can see exactly where they come from.
When we want to investigate the cause of a slow query we can use
our /explain tool with Hubot which you
can find here.
Being able to explain queries in chat may seem like a neat toy but it actually provides insight for everyone in the room. This is a great way to discuss the problem and learn from each …
[Read more]