MongoDB get executionStats for aggregate query

后端 未结 4 1772
暖寄归人
暖寄归人 2021-02-13 06:23

I am looking for a way to retrieve the executionStats for aggregations.

When using find(), I can retrieve them easily by using explain. Example output:

4条回答
  •  一生所求
    2021-02-13 07:27

    executionStats was not supported for mongo aggregation queries till mongodb v3.4. The issue has been fixed in v3.6. i.e. db.videos.explain('executionStats').aggregate([])

提交回复
热议问题