# Pmm Mysql agent

**URL:** <https://forums.percona.com/t/pmm-mysql-agent/41330>\
**Category:** Percona Monitoring and Management (PMM)\
**Created:** [October 12, 2026, 8:45am UTC](https://forums.percona.com/t/pmm-mysql-agent/41330 "2026-10-12T08:45:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stofa.kenida](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@stofa.kenida](https://forums.percona.com/u/stofa.kenida)\
**Post date:** [October 12, 2026, 8:45am UTC](https://forums.percona.com/t/pmm-mysql-agent/41330/1 "2026-10-12T08:45:29Z")

</div>

## 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 🙂

# 

```auto
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:

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [October 12, 2026, 9:04am UTC](https://forums.percona.com/t/pmm-mysql-agent/41330/2 "2026-10-12T09:04:48Z")

</div>

Hi @stofa.kenida ,

Can you try the following:

```auto
innodb_stats_on_metadata = ON;

```

and run ANALYZE TABLE.

Thanks,  
K

---

<div class="post-metadata">

**Author:** ![Yunus](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus/32/6430_2.png) [@Yunus](https://forums.percona.com/u/Yunus)\
**Post date:** [October 15, 2026, 3:39am UTC](https://forums.percona.com/t/pmm-mysql-agent/41330/3 "2026-10-15T03:39:29Z")

</div>

Hi Stofa,

The query should not take 3 seconds unless it is being affected by something else.

I would ask, If this query is affecting the instance. Or this performance schema query is affected by the other issues 🙂

What happens when you manually run this query on a instance? Does that takes same amount of time when the instance is in good condition?

---

<div class="post-metadata">

**Author:** ![stofa.kenida](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@stofa.kenida](https://forums.percona.com/u/stofa.kenida)\
**Post date:** [October 15, 2026, 11:02am UTC](https://forums.percona.com/t/pmm-mysql-agent/41330/4 "2026-10-15T11:02:46Z")

</div>

Currently, we have no critical performance issues on the istance. But only, because there is no heavy traffic and qierues on the database.

I guess, we will have problems if in the future we will havo more traffic.

I confirm. Also if we excute the query mannually from mysql client, it takes 3 secs.

The following status variables is 🙂

Performance\_schema\_mutex\_instances\_lost = 114978096

The instance uptime 🙂

Uptime: 184 days 55 min 0 sec

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [October 15, 2026, 1:34pm UTC](https://forums.percona.com/t/pmm-mysql-agent/41330/5 "2026-10-15T13:34:57Z")

</div>

did you try config change and analyze?
