簡體   English   中英

PyMongo 聚合如何獲取 executionStats

[英]PyMongo Aggregate how to get executionStats

我正在嘗試獲取特定 mongo 聚合查詢的 executionStats。 我運行 db.command 但這並沒有給出“執行狀態”

這就是我想要做的。 如何使用 db.command 獲取 Python Mongo Aggregate 解釋?

pymongo 聚合不允許解釋選項

這對我有用:

db.command('explain', {'aggregate': coll_name, 'pipeline': you_pipeline, 'cursor': {}}, verbosity='executionStats')

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM