Answer the question
In order to leave comments, you need to log in
How to find out the execution time of an aggregation query at the mongoose db level?
I am writing a query that groups data through Mongoose, how can I find out the query execution time at the database level?
Student.aggregate([
{$lookup:{
from:"groups",
localField:"group",
foreignField:"_id",
as: "group"
}},
{$unwind: "$group"},
{$group: { _id: {groupnum:"$group.num", passnum:"$passport.num"}, count:{$sum:1} }}
])
.explain("executionStats") doesn't work
here to learn time of performance of this request?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question