Hi,
can you please post some more details:
- The OS version you are using, and your driver version (if applicable)
- How did you measure the 1.5 seconds execution time? Also, does the
1.5 seconds timing remain consistent if you execute the query multiple
times?
- Your provisioned hardware (CPU, RAM size, etc.)
- The size of the data, please post the output of db.collection.stats() and db.stats()
- The query that you are running and some example documents
- Any indexes defined in the collection (i.e. using the command db.collection.getIndexes())
For more information about aggregation pipeline performance
improvement, you can find more information in the MongoDB documentation:
Also, you mentioned that you are running MongoDB 3.2.1. Please
consider upgrading to the latest version in the 3.2 series (currently
3.2.12). For more information about enhancement and bug fixes of the
latest version since MongoDB 3.2.1, please have a look at the release notes.
Best Regards,
Ivan