pt-query-digest should allow filtering by table

Bug #1718957 reported by Sheeri K. Cabral
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Invalid
Undecided
Unassigned

Bug Description

I would love to be able to filter binlog and slow query log events by table. pt-query-digest already parses out table names (for the report section "Tables") so it should be possible to do this.

grep doesn't quite do the job because there's no defined # of lines in a binlog event (I haven't checked if slow query log is similar). I can make a kind of parser using awk (or more complex in perl), to indicate new events start at "# at POSITION", but that's a hack.

Something like the following command, to extract full events from only the tables named foo, bar or baz
pt-query-digest --tables foo,bar,baz mysql-bin.000001 --type=binlog

or

pt-query-digest –filter ‘($event->{table} || “”) =~ m/^foo$|^bar$|^baz$/’ mysql-bin.000001 --type=binlog

Revision history for this message
Sheeri K. Cabral (awfief) wrote :

This is a feature request so I registered a blueprint: https://blueprints.launchpad.net/percona-toolkit/+spec/log-parsing-by-table

Changed in percona-toolkit:
status: New → Invalid
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-1446

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.