pt-query-digest ignores --limit when running for 24h

Bug #1074472 reported by Perrin Harkins on 2012-11-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to

Bug Description

I've been using this from cron to send a daily report of slow queries:

pt-query-digest --processlist h=dbhost,u=root,p=mypassword --run-time 24h --limit=10 | mutt -s "Daily Top 10 Queries" <email address hidden>

This works great except that it sends hundreds of queries, not just 10. If I use a lower --run-time, like 24m, everything works as expected.

My tool version is 2.1.5, MySQL version 5.0.91-community-log.

Perrin Harkins (perrin) on 2012-11-02
description: updated
Daniel Nichter (daniel-nichter) wrote :

This one might be difficult to reproduce if it requires running for a day, but we'll try nonetheless and see if --limit is somehow affected by different --run-time lengths.

tags: added: limit pt-query-digest run-time wrong-output
Changed in percona-toolkit:
status: New → Triaged
Perrin Harkins (perrin) wrote :

I looked into this some more and finally discovered that it was the default setting of --outliers that was adding more queries in. Unfortunately, there is no way to turn that off completely except to specify an absurd value, but that's a separate issue. Consider this bug report retracted.

Daniel Nichter (daniel-nichter) wrote :

Thanks for reporting back. I'll keep in mind that --outliers can't be disabled when/if someday we do some major work on pqd.

Changed in percona-toolkit:
status: Triaged → Invalid

Percona now uses JIRA for bug reports so this bug report is migrated to:

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

Other bug subscribers