Pmm Mysql agent

Looking at your slow query log, the query examines only 478 rows. Even though it performs a full table scan, 3 seconds seems unusually high for such a small result set. We should investigate what is causing the delay.

You can try Kedar’s suggestion as well.

On top of that,

SELECT COUNT(*) AS total_mutex_instances FROM performance_schema.mutex_instances;

SELECT NAME, COUNT(*) AS instances FROM performance_schema.mutex_instances GROUP BY NAME ORDER BY instances DESC LIMIT 20;

A related Percona discussion reports growth in LOCK_ticket_store_ops mutex instances. We can try to determine whether the same pattern exists on PXC 8.0.39. MySQL documents mutex_instances as the table listing mutexes observed by Performance Schema.

There was bug reported for that

https://perconadev.atlassian.net/browse/PXC-5310

Also check this

SHOW GLOBAL STATUS LIKE 'Performance_schema_mutex_instances_lost';

SHOW GLOBAL VARIABLES LIKE 'performance_schema_max_mutex_instances';

This is to try to check whether the slow query is related to mutex-instance growth or whether another factor is responsible. Since you’re running PXC 8.0.39, the issue was reported for v8.0.42.

Also if you have any other instance (replica), does this query takes same amount of time on that instance as well?

Is there any possibility to restart the mysql in maintenance window and see if the query behaves same?