Bha*_*avi 5 python mongodb pymongo aggregation-framework
我正在尝试获取特定 mongo 聚合查询的 executionStats。我运行 db.command 但这并没有给出“执行状态”
war*_*iuc 12
这对我有用:
db.command(
'explain',
{
'aggregate': coll_name,
'pipeline': your_pipeline,
'cursor': {}
},
verbosity='executionStats'
)
Run Code Online (Sandbox Code Playgroud)