Details
Description
Suggested implementation:
- Add version check
- 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
- relates to
-
PMM-5965 Query fingerprint doesn't match example
-
- Open
-