Handle multiple query those are exactly same in mongoDB?

Suppose I have recently 1000 db.collection.find() query and these all are the same queries with same conditions and same value.

But these query request by different users, so MongoDB has different 1000 query.

so my question is that MongoDB going to process each query individual or MongoDB going to take advantage of the pre-processed query result.

Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown 路 Publish articles on custom domain 路 Gain readership on day zero 路 Automatic GitHub backup and more

Comments (1)

Gijo Varghese's photo

MongoDB will process each query individually. If you're worried about too much concurrent queries, returning the same result, you could implement some caching solutions like Redis cache