Thursday, January 19, 2012

Mongo Map Reduce Vs. Query

Just had something come up today where I had to take a bunch of users from an existing collection and put some of their data in a new collection with new IDs. Here are two approaches that do the same thing, with wildly different speeds.

Map reduce is way faster than looping over a really fast query for this kind of work!

No comments:

Post a Comment