# PMM-QAN MongoDB Explain not working for Aggregation queries

**URL:** <https://forums.percona.com/t/pmm-qan-mongodb-explain-not-working-for-aggregation-queries/18800>\
**Category:** PMM 2.x\
**Tags:** pmm, mongodb\
**Created:** [November 28, 2022, 8:55pm UTC](https://forums.percona.com/t/pmm-qan-mongodb-explain-not-working-for-aggregation-queries/18800 "2022-11-28T20:55:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirangelli](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kirangelli](https://forums.percona.com/u/kirangelli)\
**Post date:** [November 28, 2022, 8:55pm UTC](https://forums.percona.com/t/pmm-qan-mongodb-explain-not-working-for-aggregation-queries/18800/1 "2022-11-28T20:55:36Z")

</div>

Hi Team,

We are using PMM2-client version 2.32.0  
PMM-Server version 2.30.0

We have enabled Database Profiling and added MongoDB service. The queries are getting captured.

But, the problem is whenever there is a query which uses Aggregation function, Explain is not working.  
We see an error “Cannot explain this type of query”.

Is that a limitation with PMM? Please clarify.

Thank you  
Kiran

---

<div class="post-metadata">

**Author:** ![Jiri\_Ctvrtka](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jiri_ctvrtka/32/8302_2.png) [@Jiri\_Ctvrtka](https://forums.percona.com/u/Jiri_Ctvrtka)\
**Post date:** [December 3, 2022, 8:31am UTC](https://forums.percona.com/t/pmm-qan-mongodb-explain-not-working-for-aggregation-queries/18800/2 "2022-12-03T08:31:47Z")

</div>

Hi Kiran, thanks for notice this. We have also two another reports related to this. Right now, its limitation in QAN for MongoDB. I created ticket: [[PMM-11185] QAN: Mongo explain doesnt work for queries with aggregation. - Percona JIRA](https://jira.percona.com/browse/PMM-11185) to improve explain and make it work for queries with aggregation. You can add yourself as a watcher of this ticket to dont miss updates on it. Thank you.
