author:


Database

MySQL Error Codes Out Of Context

December 11, 2014

In the wrong context, almost anything can be funny, and MySQL’s error codes are no exception. A few weeks ago, things got a little loopy as we discovered some definitions that could be taken more than one way. How It Began It started with …




author:


Database

How Exponentially Weighted Moving Averages Work

November 25, 2014

We use exponentially weighted moving averages (EWMAs) quite a bit in a few algorithms. They’re one of the tricks everyone should have in their toolbox for cheaply approximating recent history of a time-series variable. We even wrote an open-source implementation in Go. How do …


author:


Database

Analyzing Prepared Statement Performance

November 19, 2014

Optimizing MySQL performance requires the ability to inspect production query traffic. If you’re not seeing your application’s production workload, you’re missing a vital part of the picture. In particular, there are lots of performance optimizations your systems might be doing that you’re not aware …




author:


Database

Using Netlink to Optimize Socket Statistics

September 22, 2014

This is a story of using low-level kernel interfaces to optimize an edge case one of our agents encountered in some servers. The TL;DR version is that accessing /proc/ can be very expensive if there are a lot of network connections, and the Netlink …


author:


Database

What Privileges Does EXPLAIN Require in MySQL?

July 28, 2014

Here’s a simple question that I wasn’t able to solve with Google or the MySQL documentation (which is normally excellent). Perhaps it’s mentioned somewhere, but I can’t find it. Here’s the question: What privileges must a user have to run EXPLAIN for a query? …


author:


Database

Prepared Statement Samples

July 25, 2014

One of our most useful features is Top Queries, which allows users to examine various metrics for families of similar queries. Once a query family is selected, we can drill down into its query samples. Individual samples are shown on a scatterplot. Selecting individual …