I am trying to get executionStats of a Particular mongo aggregate query. I run db.command but that doesn't give "execution status"
This is what I am trying to do. how to get Python Mongo Aggregate explain using db.command?
I am trying to get executionStats of a Particular mongo aggregate query. I run db.command but that doesn't give "execution status"
This is what I am trying to do. how to get Python Mongo Aggregate explain using db.command?
This worked for me:
db.command(
'explain',
{
'aggregate': coll_name,
'pipeline': your_pipeline,
'cursor': {}
},
verbosity='executionStats'
)
© 2022 - 2024 — McMap. All rights reserved.