Incomprehensible amount!

Hello, I have a problem with my sum in Query Analytics
it gives me too high numbers.

Example:
I have a query that on pmm makes a total sum of 14,36k and when I do this query

SELECT
  *
FROM
  `performance_schema`.`events_statements_summary_by_digest`
WHERE
  `DIGEST` IS NOT NULL
  AND `QUERY_SAMPLE_TEXT` IS NOT NULL

I see that it is made 215.

They are compared in the same period

do you know what for ?

1 Like

Hello @venomania,
I don’t understand your question. That query is being executed by PMM to collect metrics. The query runs very frequently.

1 Like

Hello,
I noticed that when I execute this query on my side in the field count_star I have a result that is 215 and in pmm when I look at the Query Count I have another one that is 14.36k while it should be executed at most 400 times.

I would like to know where this difference comes from ?

1 Like

Data that lives in performance_schema is not permanent. As memory fills up, old data is purged. PMM scrapes this data frequently as to not miss when data is purged. Thus, your total in PMM is the result of collecting count_star data over along period of time.

1 Like

yes but in the example I gave above I had the same period before the performance_schema purge was done and I had a big difference between what the performance_schema (215 query ) and pmm(14.36k query ).

and moreover as said before this query can’t be played more than 400 times

1 Like

If you change the period in PMM, does the ‘Sum’ column also change? If not, then PMM is showing your the Sum total of all collections and not over the period, which would be considered a bug.

1 Like

the sum changes with time but it remain too high.

example:

I put the period from 14h12 to 14h14 on 23/06/22 for a precise request and pmm says that in 3 minutes it was executed 8.02k for a time of 413.33 ms/query and or total that makes a time of 55 Minute 17 second and it is just impossible


1 Like