Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Compass
Created by Guest
Created on Jul 1, 2021

Aggregation pipeline stage metrics

We are working on a pipeline Query, Its taking good amount of time. We have lot of stages. it would be good we can get know which stage is taking more time. Is there any way we can get the stats of each pipeline stage like approx duration, no of a document? is there a way we can identify how much CPU or memory that entire pipeline took?
  • Attach files
  • Guest
    Sep 10, 2021
    I'm moving this request to Compass, since it seems that the request is about usability fo representation
  • Guest
    Sep 1, 2021
    We found Third-party tool Studio3T which does what i propsoed above.. https://studio3t.com/knowledge-base/articles/build-mongodb-aggregation-queries/ we can use explain as suggested, very difficult to do analysis. Compass is in no way matching this tool's capabilities.
  • Guest
    Jul 15, 2021
    You can run explain() for your aggregation to see number of documents and execution time db.collection.explain('executionStats').aggregate([...]) https://docs.mongodb.com/manual/reference/explain-results/