Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4568

Port Percona response time distribution as audit plugin

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      The slow query log provides exact information about queries that take a long time to execute. However, sometimes there are a large number of queries that each take a very short amount of time to execute. This feature provides a tool for analyzing that information by counting and displaying the number of queries according to the the length of time they took to execute. The user can define time intervals that divide the range 0 to positive infinity into smaller intervals and then collect the number of commands whose execution times fall into each of those intervals.

      http://www.percona.com/doc/percona-server/5.5/diagnostics/response_time_distribution.html

      This feature is almost perfect to be ported as audit plugin. There are a few constraints though:

      • FLUSH QUERY_RESPONSE_TIME. We will substitute it with system variable like "query_response_time_flush". Update of this variable will trigger flush.
      • we won't port old-style "have_response_time_distribution" variable.
      • we probably won't port old-style "SHOW QUERY_RESPONSE_TIME".

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            svoj Sergey Vojtovich added a comment -

            Initial prototype

            Show
            svoj Sergey Vojtovich added a comment - Initial prototype
            Hide
            svoj Sergey Vojtovich added a comment -

            Sergei, please review attached patch.

            Show
            svoj Sergey Vojtovich added a comment - Sergei, please review attached patch.
            Hide
            svoj Sergey Vojtovich added a comment -

            Please review updated patch.

            Show
            svoj Sergey Vojtovich added a comment - Please review updated patch.
            Hide
            serg Sergei Golubchik added a comment -

            reviewed, ok to push

            Show
            serg Sergei Golubchik added a comment - reviewed, ok to push
            Hide
            rspadim roberto spadim added a comment -

            how query cache will work here?
            it will be placed at 0.01ms to 0.1ms for example? instead of the default query time?

            could we add a new column
            query_cache ENUM('Y','N') not null default 'N'
            in this case we know what kind of query was executed

            Show
            rspadim roberto spadim added a comment - how query cache will work here? it will be placed at 0.01ms to 0.1ms for example? instead of the default query time? could we add a new column query_cache ENUM('Y','N') not null default 'N' in this case we know what kind of query was executed
            Hide
            rspadim roberto spadim added a comment -

            or maybe... since the today table is running at percona, add two more fields...

            count_query_cache, total_query_cache

            to know the "no query cache used" values we could execute
            SELECT (count-count_query_cache)
            and
            SELECT (total-total_query_cache)

            Show
            rspadim roberto spadim added a comment - or maybe... since the today table is running at percona, add two more fields... count_query_cache, total_query_cache to know the "no query cache used" values we could execute SELECT (count-count_query_cache) and SELECT (total-total_query_cache)
            Hide
            rspadim roberto spadim added a comment -

            please check https://mariadb.atlassian.net/browse/MDEV-4904
            i add query cache information
            maybe it could be usefull...

            Show
            rspadim roberto spadim added a comment - please check https://mariadb.atlassian.net/browse/MDEV-4904 i add query cache information maybe it could be usefull...

              People

              • Assignee:
                svoj Sergey Vojtovich
                Reporter:
                svoj Sergey Vojtovich
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days, 4 hours
                  2d 4h
                  Remaining:
                  Time Spent - 2 days, 2 hours Remaining Estimate - 2 hours
                  2h
                  Logged:
                  Time Spent - 2 days, 2 hours Remaining Estimate - 2 hours
                  2d 2h