Aggregation Framework

Indexes And MongoDB Aggregation Framework Queries

One of the most powerful tools for checking the performance of our queries is explain(). Its use is very simple, we only have to add it to them, in this way:

The explain() method has three verbosity options: queryPlanner (default): It gives us information about the winning plan executionStats: […]