# Get the full sql query in the query analytics view

**URL:** <https://forums.percona.com/t/get-the-full-sql-query-in-the-query-analytics-view/12472>\
**Category:** PMM 2.x\
**Created:** [October 8, 2021, 9:13am UTC](https://forums.percona.com/t/get-the-full-sql-query-in-the-query-analytics-view/12472 "2021-10-08T09:13:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gie](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gie](https://forums.percona.com/u/gie)\
**Post date:** [October 8, 2021, 9:13am UTC](https://forums.percona.com/t/get-the-full-sql-query-in-the-query-analytics-view/12472/1 "2021-10-08T09:13:26Z")

</div>

hi,

what can i do to get the full sql query in the query id overview, it’s sometimes cropped:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/2/23fe2878b897e2b0da35e2278bbd28746e1b7e3e.jpeg)

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 8, 2021, 2:29pm UTC](https://forums.percona.com/t/get-the-full-sql-query-in-the-query-analytics-view/12472/2 "2021-10-08T14:29:38Z")

</div>

Are you looking at the ‘Example’ tab? If not, click the query in the table, then below that, click the ‘Example’ tab. You can click-drag downward to select the query as scrollbars are not always visible.

---

<div class="post-metadata">

**Author:** ![gie](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gie](https://forums.percona.com/u/gie)\
**Post date:** [October 8, 2021, 2:42pm UTC](https://forums.percona.com/t/get-the-full-sql-query-in-the-query-analytics-view/12472/3 "2021-10-08T14:42:47Z")

</div>

thanks for the hint with the example tab - this helps at least to show more - but this also seems to be limited somehow - it ends with … in some cases →

![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/8/8c0e42eb558322f07b6336451f573327ef61d655.png)

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 8, 2021, 2:57pm UTC](https://forums.percona.com/t/get-the-full-sql-query-in-the-query-analytics-view/12472/4 "2021-10-08T14:57:28Z")

</div>

What is the source of your query log in PMM? If you are using performance\_schema, PMM can only read what is visible in the p\_s tables which may be truncated by the server. If you are using slow log, then you should open a bug report on this.

---

<div class="post-metadata">

**Author:** ![gie](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gie](https://forums.percona.com/u/gie)\
**Post date:** [October 8, 2021, 3:03pm UTC](https://forums.percona.com/t/get-the-full-sql-query-in-the-query-analytics-view/12472/5 "2021-10-08T15:03:37Z")

</div>

performance\_schema - i guess it’s not recommended, if even possible - to make it not truncate? Or is there a variable to work with this setting?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![steve.hoffman](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/steve.hoffman/32/66_2.png) [@steve.hoffman](https://forums.percona.com/u/steve.hoffman)\
**Post date:** [October 8, 2021, 3:39pm UTC](https://forums.percona.com/t/get-the-full-sql-query-in-the-query-analytics-view/12472/6 "2021-10-08T15:39:33Z")

</div>

The current limit is queries 2048 bytes in size and we truncate after that. There is a [ticket](https://jira.percona.com/browse/PMM-8792) to allow that max to be user configurable but not yet prioritized for any near-term pickup.
