Inconsistency with lengths of Example and Fingerprints in Query Analytics

Description

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:

 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.

How to test

None

How to document

None

Activity

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

this is planned in  

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 (2.8.0), so let's prioritise that task to finish what's left

Done

Details

Assignee

Reporter

Priority

Components

Needs QA

Needs Doc

Fix versions

Story Points

Created January 10, 2020 at 2:36 PM
Updated November 13, 2024 at 8:31 AM
Resolved June 11, 2021 at 12:10 PM