Lets assume we have 2 indexes on collection :
Index 1 - a:1,b:1,c:1
index 2 - d:1
Case 1 :
query on collections :
db.collection.find({“a”:“value” , “b”:“value” ,“c”:“value” }).sort({“d”:1})
1> witch index is used for this query and why ?
For the aggregation query MongoDB can not use index for sort after group , unwind etc stages … in that case what is best option ?
Thank You