Pmm Mysql agent

Description:

We have mysql instance,Version: 8.0.39-30.1 (Percona XtraDB Cluster (GPL), Release rel30, Revision 46271a0, WSREP version 26.1.4.3)

The Mysql instance is one of 3 nodes Xtradb cluster-

The pMM agent i configured to use performance_schema and NOT slow queries.

We notice the following query :slight_smile:

Time: 2026-09-23T04:47:45.914410Z
User@Host: pmm[pmm] @  [10.12.163.2]  Id: 17851549
Schema:   Last_errno: 0  Killed: 0
Query_time: 3.061418  Lock_time: 0.000001  Rows_sent: 478  Rows_examined: 478  Rows_affected: 0  Bytes_sent: 24971
Tmp_tables: 0  Tmp_disk_tables: 0  Tmp_table_sizes: 0
Full_scan: Yes  Full_join: No  Tmp_table: No  Tmp_table_on_disk: No
Filesort: No  Filesort_on_disk: No  Merge_passes: 0
No InnoDB statistics available for this query
Log_slow_rate_type: query  Log_slow_rate_limit: 100
SET timestamp=1790138862;
SELECT EVENT_NAME, COUNT_STAR, SUM_TIMER_WAIT
FROM performance_schema.events_waits_summary_global_by_event_name;

Is taking 3.061418 sec.

How to Reproduce:

Configure mysql agent to use performance_schema

Version:

pmm-admin status
Agent ID : 2d95840e-abbb-463c-8da6-b532cc268c4d
Node ID : ac7dc9cb-a4d8-4229-a8e3-8075c56cc895
Node name: tspi1my-pkiot01.ad.aruba.it

PMM Server:
Version: 3.4.1

PMM Client:
Connected : true
Time drift : 74.513µs
Latency : 500.75µs
Connection uptime: 100
pmm-admin version: 3.4.1
pmm-agent version: 3.4.1

Logs:

No logs

Expected Result:

Is there any way to tune the above query in order to reduce execution time ?

What is the best reccomemended method to be used to configure mysql agent, performance_schem or slow quesries ?

Actual Result:

Not applicable

Additional Information:

Hi @stofa.kenida ,

Can you try the following:

innodb_stats_on_metadata = ON;

and run ANALYZE TABLE.

Thanks,
K