Slow execution of a query

Hello @dev7_gvisp, welcome to the MongoDB Community forum!

Your query filter has three fields, and this can be supported by a Compound Index on three fields (rather than the existing three single field indexes), and this can possibly aid to get a better performance.

You can measure query performance by applying the explain method on the query. This generates a Query Plan, and tells about how the index is used. The explain method has the executionStats verbosity which generates a plan with details like execution time.

1 Like