I am trying to read some limited records after performing a match query on find() collection in mongoDb.
The query takes forever to process. In the next line, I try to read elements of the returned collection and that also takes a lot of time to complete.
Please help where I am making a mistake or scope of improvement.
robot_data = collection.find({"robot_uid": {"$eq":"12345"}},{"_id":0}).sort("_id",1).limit(500)
for a in robot_data :
print(f"print elements : {a}")
Regards, Aarushi