June 20, 2013

Post: Maatkit's mk-query-digest filters

Have you ever seen BIG weird numbers in mk-query-digest report that just seem wrong? I have! Here’s one … mk-query-digest output. There’s a simple solution to that though — mk-query-digestfilter. With just a small change it will completely ignore administrator commands: mk-query-digestfilter

Post: Optimizing slow web pages with mk-query-digest

…, 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-digestfilter=’$event->{Thread… a slow query log that lists all the queries that were executed during this session in the order they were executed: mk-query-digestfilter=’$event…

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… allows mk-query digest to discover these attributes and use them for aggregation. You could also filter on the embedded information to display only queries

Post: Visualization tools for pt-query-digest tables

;-) Query Digest UI This is a advanced, but easy to install, ui for pt-query-digest or mk-query-digest. Main features: * Dynamic filtering and searching of queries * Colorized and normalized SQL syntax * Explain the query dynamically * Integrated pt-query-advisor support * Detailed 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-digestfilter ‘$event->{time} && $event->{time} > 1′” to exclude all queries which it believes took longer than the servers long-query-time of…

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 forth…

Post: Slow Query Log analyzes tools

…, body,)VALUES(3558268,’sample text’); Filtering Slow Query Log – Especially after the changes to log all queries slow query log may be growing too rapidly to follow, so we implemented slow query log filter (based on parse… 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: Estimating Replication Capacity

… other interval of your choice. 2) Use full slow query log and mk-query-digest. This method is great for one time execution especially… include all queries MySQL server ran with their times and run mk-query-digest with filter to only check queries from replication thread: mk-query-digest slow-log –filter ‘($event…

Post: Faster MySQL failover with SELECT mirroring

…. I used mk-query-digest (with some new features) to watch the traffic on the active master and replay SELECT queries against the passive… the slave. Then I used mk-query-digest to watch the traffic on the active master: mk-query-digest –processlist h=active \ –filter ‘$event->{arg} =~ m/^SELECT…

Comment: Optimizing slow web pages with mk-query-digest

… of these are useful using –filter because embedded attributes are processed before filters are applied: The query comment consists of key value pairs… session_id: XYZ mk-query-digest can then filter by web page: mk-query-digest /var/lib/mysql/slow –embedded-attributes ‘^– [^\n]+’,'(\w+): ([^\t]+)’ –filter ‘$event->{File} && $event…