Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 2.1.0, 2.4.0, 2.6.1, 2.9.0
    • 2.18.0
    • PMM Agent, QAN API
    • 2.5
    • Yes
    • Yes
    • C/S Core

    Description

      Suggested implementation:

      1. Add version check
      2. For version mysql 8.0 or higher use events_statements_summary_by_digest.QUERY_SAMPLE_TEXT instead events_statements_history.SQL_TEXT.

      How to test:

          1. Add mysql verison 8.0
          2. Add another mysql version lower than 8.0
          3. Check QAN
          4. Check query examples missing on 0% - 40% (average around 25%) by compare result of these two queries:

      SELECT count(*) FROM pmm.metrics WHERE service_type = 'mysql'
      
      SELECT count(*) FROM pmm.metrics WHERE (service_type = 'mysql') AND (example = '')

       

      There is often an empty query example in QAN2. Checked in clickhouse, and see that only 23% have query example.

       

      SELECT count(*)
      FROM pmm.metrics 
      ┌──count()─┐
      │ 41720863 │
      └──────────┘
      
      
      
      SELECT count(*)
      FROM pmm.metrics 
      WHERE example = ''
      ┌──count()─┐
      │ 32305583 │
      └──────────┘ 

       

      I do not see any explanation on why example is empty in metrics table, here are related fields:

      example:                      
      example_format:               EXAMPLE_FORMAT_INVALID
      is_truncated:                 0
      example_type:                 EXAMPLE_TYPE_INVALID
      example_metrics:               

       

      Is there anything else which I could provide to better understand the reason of this? BTW I searched in older issues and found PMM-909 which might be somehow related, I did not reopen it since it's about another version.

       

       DOD: Source of query example for MySQL 8.0 should be selected from events_statements_summary_by_digest.QUERY_SAMPLE_TEXT

      Attachments

        Issue Links

          Activity

            People

              jiri.ctvrtka Jiří Čtvrtka
              debug Mikhail Solovyev
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 2 hours, 30 minutes
                  2h 30m

                  Smart Checklist