我需要在Python代码中读取MongoDB的整个集合(集合名称为"test").我尝试过
self.__connection__ = Connection('localhost',27017)
dbh = self.__connection__['test_db']
collection = dbh['test']
Run Code Online (Sandbox Code Playgroud)
如何通过1000读取块中的集合(以避免内存溢出,因为集合可能非常大)?