pt-query-digest should allow filtering by table
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$
This is a feature request so I registered a blueprint: https:/ /blueprints. launchpad. net/percona- toolkit/ +spec/log- parsing- by-table