Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1850

Explain support for aggregate with "executionStats"

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: API
    • Labels:
      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@mongodb.com Shane Harvey
            Reporter:
            bhavaniravi Bhavani Ravi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: