-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.7.2
-
Component/s: Command Ops
-
Environment:macOS 10.13.6, PyCharm 2018.03.01 professional edition
Hey guys,
I have an indexed db to query data with first_name, last_name and date of birth.
filter_dict = { 'person.last_name': last_name), 'person.first_name': first_name), 'person.dob': {'$regex': "^" + date_of_birth[:4]} } ... data_found = collection.find_one(filter_dict)
It works fine when there is a match in the db, but is super slow when there is no match. The cursor returned by find() takes forever to load, which often causes time out error. However, directly executing the query in Robo 3T has no issue at all.
I handled the time out exception and temporarily made the code work, yet this won't be a sustainable solution. Can anyone here help me find out the cause?