It's also O(n) sure and only details will tell if it's faster than SQL but the point was in that by doing that you're getting raw data from the database without turning it into mapped objects. In that example code the variable 'item' would be a dict not a fancy class instance with methods and stuff.
Comment
It's also O(n) sure and only details will tell if it's faster than SQL but the point was in that by doing that you're getting raw data from the database without turning it into mapped objects. In that example code the variable 'item' would be a dict not a fancy class instance with methods and stuff.
Parent comment
How can you have speed in "for item in collection.find()" loop? It is O(n) when you use such approach with SQL. How can it be different for MongoDB?