… mk-query-digest to list me top slowest queries, I asked it to list me top slowest sessions: mk-query-digest –group-by=Thread_id –order-by=Query… way, unfortunately mk-log-player will not have all the other useful information, not even query timing. Instead, I’ve used mk-query-digest: mk-query-digest –filter…
Post: Maatkit's mk-query-digest filters
… kind of messes up the whole mk-query-digest output. There’s a simple solution to that though — mk-query-digest –filter. With just a small change it will completely ignore administrator commands: mk-query-digest –filter=’$event->{arg} !~ m…
Post: How to generate per-database traffic statistics using mk-query-digest
… Maatkit. There is an often-ignored gem in Maatkit’s mk-query-digest, and that is the –group-by argument. This can be… documentation is available via perldoc). %> perl mk-query-digest –limit 100% –group-by db slow.log … # Rank Query ID Response time Calls R/Call…
Post: What do we optimize with mk-query-digest ?
… at mk-query-digest report we typically look at the Queries causing the most impact (sum of the query execution times) as well as queries having… often improves response time of the system for variety of queries. Also queries causing highest impact often correspond to either frequent or…, table locks all could cause query response time to be unreasonable. If Slowest query is not interactive query, for example part of a…
Post: Gathering queries from a server with Maatkit and tcpdump
… this new functionality, it becomes possible for mk-query-digest to stand on the sidelines and watch queries fly by over TCP. It is… to analyze it. Let’s see: mk-query-digest –type=tcpdump –report-format=profile tcpdump.out # Rank Query ID Response time Calls R/Call… more useful than just seeing a query or two — it has all the power of mk-query-digest for filtering, aggregating, printing and so…
Post: Logging MySQL queries from the client instead of the server
… as the slow-query-log format, so you can analyze it easily with tools such as Maatkit’s mk-query-digest. These tools can do a lot of work for you. Or, you can log queries to a database… the “–type=tcpdump” option to mk-query-digest. You can even make it print out a “slow query log file” format with the “–print…
Post: How to Identify Bad Queries in MySQL
… queries? It shouldn’t surprise you that there is a working implementation of most of this in a tool, Maatkit’s mk-query-digest. Here’s how: It finds queries (or groups of queries) that are slow and provide a….) mk-query-digest doesn’t do part 3 — finding queries that block other queries — yet. The missing piece, part 3 — finding queries that block other queries — is…
Post: Slow Query Log analyzes tools
… seconds and allows you to log all queries in slow query log by setting long_query_time=0 This patch is adapted version…(3558268,’sample text’); Filtering Slow Query Log – Especially after the changes to log all queries slow query log may be growing too rapidly… slow query log format as well. Update 2009-03-04: most of us at Percona now use mk-query-digest from Maatkit for slow query…
Post: How to use tcpdump on very busy hosts
… mk-query-digest output was obviously bogus when compared to the host’s slow-query-log (for example, none of the top 5 slow queries…: use “mk-query-digest –filter ‘$event->{time} && $event->{time} > 1′” to exclude all queries which it believes took longer than the servers long-query-time…


Post: mk-query-digest, query comments and the query cache
… binary log and the slow query log. Maatkit includes tools which interact with these logs, including mk-query-digest. This tool, in particular, has a very nice option called –embedded-attributes which can process data embedded in query comments…