# QAN - increase query length and examples/explain

**URL:** https://forums.percona.com/t/qan-increase-query-length-and-examples-explain/8164
**Category:** PMM 2.x
**Created:** [October 22, 2020, 1:24am UTC](https://forums.percona.com/t/qan-increase-query-length-and-examples-explain/8164 "2020-10-22T01:24:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![agrowe](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@agrowe](https://forums.percona.com/u/agrowe)
#### Post date: [October 22, 2020, 1:24am UTC](https://forums.percona.com/t/qan-increase-query-length-and-examples-explain/8164/1 "2020-10-22T01:24:18Z")

</div>

Is there a way when running PMM with a MySQL node to increase the length of the queries displayed in Query Analytics?

Currently they are getting truncated for our longer queries I am trying to review and they also don’t show any information in Examples or Explain.

---

<div class="post-metadata">

### Author: ![tiagomotasantos](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/tiagomotasantos/32/2424_2.png) [@tiagomotasantos](https://forums.percona.com/u/tiagomotasantos)
#### Post date: [October 22, 2020, 4:28am UTC](https://forums.percona.com/t/qan-increase-query-length-and-examples-explain/8164/2 "2020-10-22T04:28:12Z")

</div>

Hi @agrowe,

You can hover the icon next to the query to see the full query:

 ![full_query_1.png](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/4afb9bcd431fcbe762fdc1c12a81780f52c37cd5.png)

 ![full_query_2.png](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/f653473895691359ff056893f9d910f086047223.png)

If that doesn’t work for you please check the comments in the following feature request to see if it matches your problem: [https://jira.percona.com/browse/PMM-6692](https://jira.percona.com/browse/PMM-6692).

Thank you for the question and hope this helps!

---

<div class="post-metadata">

### Author: ![agrowe](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@agrowe](https://forums.percona.com/u/agrowe)
#### Post date: [October 22, 2020, 3:59pm UTC](https://forums.percona.com/t/qan-increase-query-length-and-examples-explain/8164/3 "2020-10-22T15:59:05Z")

</div>

Hi @tiagomotasantos

Thanks for linking that Jira ticket, it looks to be what I was seeing with the performance schema.

When hovering over the (i) icon, the full query isn’t available which then also causes issues for the examples/explain tabs as they can’t show anything.

According to that ticket, I need to update “max\_digest\_length” and “performance\_schema\_max\_digest\_length” which are the normalised values seen in the query popup.

To also get the examples column working, it looks like I also need to update “performance\_schema\_max\_sql\_text\_length”, is that correct?

Are there also any performance considerations to take into account when raising these? the ticket had values of 4000 up from 1024 and also the docs mention a 10:1 ratio of queries to sessions. With only a few hundred sessions at a time, it only looks to add around 8MB total memory requirements.

Thanks

---

<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, 8:03pm UTC](https://forums.percona.com/t/qan-increase-query-length-and-examples-explain/8164/4 "2020-11-10T20:03:46Z")

</div>

Hi,

as posted in another thread, the examples/explain tabs worked for me after enabling the events\_statements\_current and events\_statements\_history consumers.

max\_digest\_length configures the max length for the normalized version (as shown in the screenshot)

max\_sql\_text\_length configures the max length for the SQL\_TEXT column, it is used as example (which is then used for the explain)

[https://forums.percona.com/discussion/comment/57538/#Comment\_57538](https://forums.percona.com/discussion/comment/57538/#Comment_57538)

---

<div class="post-metadata">

### Author: ![MahendraB](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mahendrab/32/9108_2.png) [@MahendraB](https://forums.percona.com/u/MahendraB)
#### Post date: [October 8, 2024, 7:01pm UTC](https://forums.percona.com/t/qan-increase-query-length-and-examples-explain/8164/5 "2024-10-08T19:01:29Z")

</div>

> [@agrowe](#):
>
> Are there also any performance considerations to take into account when raising these? the ticket had values of 4000 up from 1024 and also the docs mention a 10:1 ratio of queries to sessions. With only a few hundred sessions at a time, it only looks to add around 8MB total memory requirements.

Did you increase the values from default 1024 to 4000 and checked the performance?
