My suggestion is to look at the explain query plan and determine whether it is properly using an efficient index. See cursor – Tools for iterating over MongoDB query results - PyMongo 4.10.1 documentation and https://www.mongodb.com/docs/manual/reference/command/explain/#output .