Inconsistency with lengths of Example and Fingerprints in Query Analytics
General
Escalation
General
Escalation
Description
How to test
None
How to document
None
is blocked by
is duplicated by
Smart Checklist
Activity
Show:
Nailya Kutlubaeva June 3, 2021 at 12:38 PM
tested for Mysql, Mongo and PostgreSQL with generating very long query:
┌─max(length(fingerprint))─┬─max(length(example))─┐
│ 984 │ 2048 │
└──────────────────────────┴──────────────────────┘
Roma Novikov July 29, 2020 at 8:49 AM
@David Ducos this is planned in https://perconadev.atlassian.net/browse/PMM-3580#icft=PMM-3580
David Ducos July 28, 2020 at 6:41 PM
Guys? why don't we keep just latest example of the query instead of having useless data? One good example is better of having several of trimmed queries.
Alexey Palazhchenko July 28, 2020 at 6:31 PM
I think it was completely or almost completely done in https://perconadev.atlassian.net/browse/PMM-5365#icft=PMM-5365 (2.8.0), so let's prioritise that task to finish what's left
Alexey Palazhchenko January 17, 2020 at 6:54 AM
Done
Created January 10, 2020 at 2:36 PM
Updated November 13, 2024 at 8:31 AM
Resolved June 11, 2021 at 12:10 PM
PMM should set some reasonable limits of the query lengths as it takes queries from external data source. Currently I for MySQL using slow query log this:
6bc4a70713eb :) select max(length(fingerprint)),max(length(example)) from metrics; SELECT max(length(fingerprint)), max(length(example)) FROM metrics ┌─max(length(fingerprint))─┬─max(length(example))─┐ │ 563345 │ 1024 │ └──────────────────────────┴──────────────────────┘ 1 rows in set. Elapsed: 0.722 sec. Processed 3.48 million rows, 634.45 MB (4.82 million rows/s., 878.31 MB/s.)
Storing 500K fingerprint is impractical, for example from standpoint of showing it in UI
We already truncate example.... if anything there is more harm truncating example as it makes EXPLAIN non functional.
This data is from MySQL/Slow Query Log. Some data sources like Performance Schema enforce their own max length of stored query and do truncation
Suggested fix:
use the same max length of fingerprint as for query example.