MongoDB MapReduce is much slower than pure Java processing?

This isn't that much of an answer, but in the o'reilly mongo book, kristina says that map-reduce queries are one of the slowest things you can do, but they are also the most flexible and the most scalable. Mongo will be able to break apart the query and handle the processing power across all the nodes, which means you should get linear scalability with each node you add. But on a single node, even a group by query will be faster then map reduce.

As Matt said. I'd be looking more at mongo map-reduce when the space requirements for your map reduce operation outstrip the amount of memory available. They involve the creation and population of a temporary collection to create the result (and executes in javascript), they're going to be a heap slower than straight calculations on the JVM.

– Michael Dec 14 '10 at 10:03 Thanks for your reply! I came to the same conclusion in regard to the follwing jira, where performance is reported to be 350 times worse using mongo's map reduce than python: jira.mongodb. Org/browse/SERVER-1197 The answer here goes in the same direction: stackoverflow.Com/questions/2599943/2613106#2613106 – Kay Dec 14 '10 at 10:04.

Another reason is that mongodb has problems with it's javascript engine which only allows them to use one single thread. Mongodb plans to switch to google's v8 javascript engine wich hopefully allows mongodb to process map/reduce multi threaded. See mongodb.org/display/DOCS/MapReduce#MapRe... and https://jira.mongodb.Org/browse/SERVER-2407.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions