title: Mongoose find() with cursor vs findOne() performance
body: <p>I am getting unexpectadly long query time for findOne() mongoose queries when compared to find()</p>
  
  <pre><code>var batchSize = 25;
  var cursor = collection1.find().lean().cursor({batchSize: batchSize});
  cursor.on('data', function(col1rec){
      var parm1 = col1rec.parm1;
      var parm2 = col1rec.parm2;
      collection2.findOne({parm1:parm1}, function(err, col2rec){
          collection3.findOne({parm2:parm2}, function(err, col3rec){
              var linkRec = Object.assign({}, col1rec, col2rec, col3red);
              new Collection4(linkRec).save();
          });
      });
  });
  </code></pre>
  
  <p><strong>Use case</strong>: link records from different collections.</p>
  
  <ol>
  <li>get a cursor on collection1 to loop over;</li>
  <li>query collection2 and find doc with parm1.</li>
  <li>query collection3 and find doc with parm2.</li>
  <li>save linked record to mongoDB collection4.</li>
  </ol>
  
  <p>collection2 has parm1 has index and Collection3 has parm2 has index.</p>
  
  <p>To monitor the database avg query times I used <a href="https://docs.mongodb.com/manual/reference/program/mongotop/" rel="nofollow noreferrer">mongotop</a>. which produces the following outputs:</p>
  
  <pre><code>         ns    total    read    write    2017-11-29T17:12:50Z
  Collection3     56ms    56ms      0ms
  Collection4     56ms     0ms     56ms
  Collection2     54ms    54ms      0ms
  Collection1      2ms     2ms      0ms
  </code></pre>
  
  <p><strong>How can findOne in Collection2 and Collection3 take ~50 ms as in Collection1 a cursor iterating take only 2ms?</strong></p>
  
  <p><strong>This really adds up and in the end I get really long processing time. What am I doing wrong and how can I lower the findOne query time?</strong></p>
  
  <p>Also, if instead of nesting the findOne in a cursor and loop over the collection, if I try to link just 1 record by a parameter the findOne take ~1 ms.</p>
  
  <p><strong>Is it not a good policy to have nested mongoose queries inside the cursor?</strong></p>