Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-1461

LP #1733934: Document distill for pt-query-digest

Details

    • Bug
    • Status: On Hold
    • Low
    • Resolution: Unresolved
    • None
    • None
    • Documentation

    Description

      **Reported in Launchpad by Bill Karwin last update 22-11-2017 18:56:50

      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.

      Attachments

        Activity

          People

            dmitriy.kostiuk Dmitriy Kostiuk
            lpjirasync lpjirasync (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Smart Checklist