This is my connection string -
mongodb+srv://clustername:password@clustername.rq1blmy.mongodb.net/company?retryWrites=true&w=majority&appName=Clustername
this is the query i just used -
db.orders.explain(“executionStats”).aggregate([
{
$lookup: {
from: “A”,
localField: “B”,
foreignField: “_id”,
as: “details”
}
},
{
$unwind: “$details”
},
{
$lookup: {
from: “C”,
localField: “_id”,
foreignField: “_id”,
as: “details”
}
},
{
$unwind: “$details”
}
]);
I had tried with multiple updated queries. but all the time i got the Error -
*Option “explain” cannot be used on an aggregate call with writeConcern
How to resolve this error ?
Or is there any other way to find out Execution Time of queries ??