# QAN never shows query plan

**URL:** <https://forums.percona.com/t/qan-never-shows-query-plan/8160>\
**Category:** PMM 2.x\
**Created:** [October 20, 2020, 4:00pm UTC](https://forums.percona.com/t/qan-never-shows-query-plan/8160 "2020-10-20T16:00:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![brett1](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/brett1/32/2799_2.png) [@brett1](https://forums.percona.com/u/brett1)\
**Post date:** [October 20, 2020, 4:00pm UTC](https://forums.percona.com/t/qan-never-shows-query-plan/8160/1 "2020-10-20T16:00:35Z")

</div>

Hi, I have PMM 2.11.1 installed from the AWS AMI. I’m monitoring and RDS instance with the performance schema turned on. I see queries in the QAN however I never see a query plan:

I have configured the performance schema as documented here:

[Configuring Performance Schema](https://www.percona.com/doc/percona-monitoring-and-management/2.x/manage/conf-mysql-perf-schema.html)

Is there some other setting that needs to be set?

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [November 3, 2020, 7:50am UTC](https://forums.percona.com/t/qan-never-shows-query-plan/8160/2 "2020-11-03T07:50:46Z")

</div>

Hi Brett, can you double check if the monitoring user has this grants:

```auto
GRANT SELECT, PROCESS, REPLICATION CLIENT ON *.* TO 'pmm'@'%' IDENTIFIED BY 'pass' WITH MAX_USER_CONNECTIONS 10;
GRANT SELECT, UPDATE, DELETE, DROP ON performance_schema.* TO 'pmm'@'%';

```

This is taken from:

[https://www.percona.com/doc/percona-monitoring-and-management/amazon-rds.html](https://www.percona.com/doc/percona-monitoring-and-management/amazon-rds.html)

---

<div class="post-metadata">

**Author:** ![kalyan\_rajput](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kalyan_rajput/32/6375_2.png) [@kalyan\_rajput](https://forums.percona.com/u/kalyan_rajput)\
**Post date:** [November 6, 2020, 4:56am UTC](https://forums.percona.com/t/qan-never-shows-query-plan/8160/3 "2020-11-06T04:56:50Z")

</div>

@igroene The queries which you have mentioned doesnt work for mysql 8 version. Can you please check from your end as well. From Identified it is throwing error correct the syntax.

Regards,

Kalyan

---

<div class="post-metadata">

**Author:** ![kalyan\_rajput](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kalyan_rajput/32/6375_2.png) [@kalyan\_rajput](https://forums.percona.com/u/kalyan_rajput)\
**Post date:** [November 6, 2020, 4:56am UTC](https://forums.percona.com/t/qan-never-shows-query-plan/8160/4 "2020-11-06T04:56:59Z")

</div>



---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [November 6, 2020, 6:09am UTC](https://forums.percona.com/t/qan-never-shows-query-plan/8160/5 "2020-11-06T06:09:15Z")

</div>

Hi, MySQL 8 doesn’t support creating the user and granting privileges on the same sentence. You can do it like this instead:

CREATE USER ‘pmm’@‘%’ IDENTIFIED BY ‘pass’ WITH MAX\_USER\_CONNECTIONS 10;

GRANT SELECT, PROCESS, REPLICATION CLIENT ON _._ TO ‘pmm’@‘%’;

GRANT SELECT, UPDATE, DELETE, DROP ON performance\_schema.\* TO ‘pmm’@‘%’;

Hope that helps

---

<div class="post-metadata">

**Author:** ![brett1](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/brett1/32/2799_2.png) [@brett1](https://forums.percona.com/u/brett1)\
**Post date:** [November 6, 2020, 9:17am UTC](https://forums.percona.com/t/qan-never-shows-query-plan/8160/6 "2020-11-06T09:17:01Z")

</div>

Hi @igroene indeed our pmm users has these grants:

±----------------------------------------------------------------------------------------------------------+

| Grants for percona\_pmm@172.% |

±----------------------------------------------------------------------------------------------------------+

| GRANT SELECT, PROCESS, REPLICATION CLIENT ON _._ TO ‘percona\_pmm’@‘172.%’ IDENTIFIED BY PASSWORD |

| GRANT SELECT, UPDATE, DELETE, DROP ON `performance_schema`.\* TO ‘percona\_pmm’@‘172.%’ |

±----------------------------------------------------------------------------------------------------------+

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [November 6, 2020, 9:21am UTC](https://forums.percona.com/t/qan-never-shows-query-plan/8160/7 "2020-11-06T09:21:05Z")

</div>

Ok in case you have double checked the config is correct I suggest you to open a bug in our issue tracker [https://jira.percona.com/projects/PMM/issues](https://jira.percona.com/projects/PMM/issues)

---

<div class="post-metadata">

**Author:** ![scf](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@scf](https://forums.percona.com/u/scf)\
**Post date:** [November 10, 2020, 7:55pm UTC](https://forums.percona.com/t/qan-never-shows-query-plan/8160/8 "2020-11-10T19:55:04Z")

</div>

please post the output of: `SELECT * FROM performance_schema.setup_consumers;`

those consumers should be enabled for the “example” and “explain” tabs to work (tested on Amazon Aurora MySQL 1.22 / 5.6):

```auto
events_statements_current
events_statements_history
global_instrumentation
thread_instrumentation
statements_digest﻿
you might want to review/increase those variables too:
performance_schema_events_statements_history_size
performance_schema_max_digest_length
performance_schema_max_sql_text_length

```

[MySQL :: MySQL 5.6 Reference Manual :: 22.12.6.1 The events\_statements\_current Table](https://dev.mysql.com/doc/refman/5.6/en/performance-schema-events-statements-current-table.html)
