You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#methods1 using the OO query:
result = Doc1().find({"p1" : {"$in": ["l1","l2","l3"]}})
for doc in await result.to_list(length=100):
other coding
# methods2 using motor async query:
cursor = collection.find({"p1" : {"$in": ["l1","l2","l3"]}})
for doc in await result.to_list(length=100):
other coding
Both methods return data successuful, but the first method take more time than the second method(700ms v.s. 50ms). I think the deserialization process in each iteration spends time in the first method.
Is there any problem in my code. If not, how can I change my method to reduce the running time.
The text was updated successfully, but these errors were encountered:
Here are my doc defination:
When i have a query calling in my hanlder
Both methods return data successuful, but the first method take more time than the second method(700ms v.s. 50ms). I think the deserialization process in each iteration spends time in the first method.
Is there any problem in my code. If not, how can I change my method to reduce the running time.
The text was updated successfully, but these errors were encountered: