Document distill for pt-query-digest

Bug #1733934 reported by Bill Karwin
30
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
New
Undecided
Unassigned

Bug Description

One of the most common questions I see about pt-query-digest is "how do I filter the report for queries that use a specific table?"

The answer is something like:

pt-query-digest --filter '$qr->distill($event->{arg}) =~ /\bMyTable\b/i' \
 /var/log/mysql/mysql-slow.log

But use of $qr->distill() is not documented, except a brief mention in the group-by section.

But it is not mentioned that to use the distill result in a filter, we have to call the distill() function because the result of the distill is not a field in the $event object by default.

I suggest this example of filtering by a specific table be added to the pt-query-digest manual, because this use case is pretty popular.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1461

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.