views:

95

answers:

1

In CouchDB you always have to use map reduce to query results.

In MongoDB you can their query methods for retrieving data, but they also let you do map-reduce.

I wonder, when do I actually need map-reduce?

Are those query methods different from map-reduce or are they just wrappers for map-reduce functions?

+2  A: 

MapReduce is needed for aggregations in MongoDB. The normal queries follow a very different (and much faster) code path and they should always be used for real-time operations. MapReduce is definitely not intended for real-time, it's more for batch jobs.

Technically, you could write all your queries using MapReduce, but that would be both painful and slow.

kristina
Thanks for the explanation. I was kinda wondering about that as well, whether to use map-reduce for real-time processing because you won't notice this in development.
jpartogi
@kristina: You said MapReduce would be PITA to write for every query. Isn't that what you do in CouchDB?
never_had_a_name