Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8368639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:26:09+00:00 2026-06-09T13:26:09+00:00

I am new to mongoDb and planning to use map reduce for computing large

  • 0

I am new to mongoDb and planning to use map reduce for computing large amount of data.
As you know we have map function to match the criteria and then emit the required data for a given filed. In my map function I have multiple emits. As of now I have 50 Fields emitted from a single document. That means from a single document in a collection explodes to 40 document in temp table. So if I have 1 million documents to be processed it will 1million * 40 documents in temp table by end of map function.

The next step is to sort on this collection. (I haven’t used sort param of map will it help?)

Thought of splitting the map function into two….but then one more problem …while performing map function if by chance I ran into an exception thought of skipping entire document data (I.e not to emit any data from that document) but if I split I won’t be able to….

In mongoDB.org i found a comment which said…”When I run MR job, with sort – it takes 1.5 days to reach 23% at first stage of MR. When I run MR job, without sort, it takes about 24-36 hours for all job.Also when turn off jsMode is speed up my MR twice ( before i turn off sorting )”

Will enabling sort help? or Will turning OFF jsmode help? i am using mongo 2.0.5

Any suggestion?

Thanks in advance .G

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:26:11+00:00Added an answer on June 9, 2026 at 1:26 pm

    The next step is to sort on this collection. (I haven’t used sort param of map will it help?)

    Don’t know what you mean, MR’s don’t have sort params, only the incoming query has a sort param. The sort param of the incoming query only sorts the data going in. Unless you are looking for some specific behaviour that will avoid sorting the final output using an incoming sort you don’t normally need to sort.

    How are you looking to use this MR. Obviusly it won’t be in realtime else you would just kill your servers so Ima guess it is a background process that runs and formats data to the way you want. I would suggest looking into incremental MRs so that you do delta updates throughout the day to limit the amount of resources used at any given time.

    So if I have 1 million documents to be processed it will 1million * 40 documents in temp table by end of map function.

    Are you emiting multiple times? If not then the temp table should have only one key per row with documents of the format:

    {
    _id: emitted_id
    [{ //each of your docs that you emit }]
    }

    This is shown: http://kylebanker.com/blog/2009/12/mongodb-map-reduce-basics/

    or Will turning OFF jsmode help? i am using mongo 2.0.5

    Turning off jsmode is unlikely to do anything significant and results from it have varied.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this regex on mongodb query to match words by prefix: {sentence: new
I'm trying to parse a very large chunk of data into a new MongoDB
I am making a new application in MongoDB, and I have found that the
I have the following code to connect to MongoDB: try { $m = new
I'm new to rails and mongodb, and have a simple form attempting to create
I'm new to Rails development and I'm starting with MongoDB also. I have been
I'm new using MongoDB, and I don't know how to solve the next problem:
I am new to MongoDb but have an existing application which would benefit heavily
I'm looking to migrate a table of user data to my shiny new MongoDB
I am new to mongoDB. I am using java and mongoDB. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.