Improve querying speed in MongoDB

DB query speed is slowed down mainly when converting fetched data to MongoDB model format.For example we fetch JSON format data from db and convert it to MongoDB model format by embedding model methods.In order to avoid this and improve querying speed we can use lean function.The format is model.find({…}).lean(), then the result is retrieved …