Need to optimize mongodb query
I have a mongodb query and already created all required indices. But query still scanning all the documents in the collection. Following is the query: [ { "$group": { "driverStatuses": { "$addToSet": "$driverStatus" }, "batchAddedAt": { "$first": "$batchAddedAt" }, "cityId":…