title: MongoDB scalability concern on large multi-update operation
body: <p>I'm using MongoDB Node.js native driver and doing an update operation with multi option enabled:</p>
  
  <pre><code>productCollection.update(
    {'categories.id': category.id}, 
    {'$set': {
      'categories.$.name': category.name,
      //...and so on
    }},
    {multi: true}
  );
  </code></pre>
  
  <p>I expect the collection to substantially grow in the future, so the updates will affect millions of records. Response time is not an issue in this case, what I'm concerned about is the future scalability of the operation, <strong>specially peak memory usage and affecting the performance of other operations</strong> in the database.</p>
  
  <p>I'm not sure how MongoDB handles situations like this, would it be better to implement some sort of "batching" by retrieving groups of records into the application (with pagination using <code>skip</code>/<code>limit</code> or <code>_id</code>/<code>limit</code>) and then do bulk updates for each "batch", even if it takes more time? </p>