General query logs and slow query logs remain one of the most
popular sources of auditing and diagnostic information in MySQL
databases. Customers often ask about the cost of general and slow
query logging so I went googling for existing research I could
point them to. The data I found was not quite what I hoped for,
which is why I decided to do some more testing.
Introduction Logging overhead is an obvious thing and it has been
the topic of many blog posts before this one. Sure enough, my
Google search returned multiple articles, however I wasn't fully
satisfied the findings.
Perhaps the topic is so obvious that DBAs don't revisit it very
often. In any case, most of the articles I found were several
years old and that presents a few issues:
- Most of the tests were run on MySQL 5.0 or 5.1.
- Database hardware isn't what it used to be, which changes the perspective on database performance bottlenecks. …