Explain support for aggregate with "executionStats"

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I am trying to do some performance check for a mongo query at scale. I would like to get the execution stats for the same.

      In the mongo shell, it is pretty straightforward like this
      db.Item_Process_For_Report.explain("executionStats").aggregate([]) 
      In the case of pymongo, the only option we have is to use explain via `db.command`
      db.command('aggregate', 'things', pipeline=pipeline, explain=True) 
       But this doesn't give me executionStats and only the query planner result.

      Why not provide an explain method that works out of the box like it does in the mongo shell.

       

      https://stackoverflow.com/questions/56255968/how-to-get-python-mongo-aggregate-explain-using-db-command

      {{}}

            Assignee:
            Shane Harvey
            Reporter:
            Bhavani Ravi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: