Aggregation with 1 simple stage - performance issue

One of the collection has 2516269 document where one of the field is state with possible value of “OPEN” ,”EXCLUDED” . When I try to retrieve document with state:”OPEN” with match operator it is taking 3.3 sec … I am trying to reduce to 1 sec … can we do that …

Yes by using a proper index.

2 Likes