title: Mongo db oddness at $in
body: <p>I have an array which contains 30 mongoid, this is my code,</p>
  
  <pre><code>$rest = $m-&gt;cart-&gt;res-&gt;find(array("_id" =&gt; array('$in' =&gt; $restin["e"])))-&gt;limit(30)-&gt;explain();
  </code></pre>
  
  <p>_id field is indexed naturally, But I get the results like it never indexed, this is my explain result,</p>
  
  <pre><code>[cursor] =&gt; BtreeCursor _id_ multi
  [isMultiKey] =&gt; 
  [n] =&gt; 30
  [nscannedObjects] =&gt; 30
  [nscanned] =&gt; 43
  [nscannedObjectsAllPlans] =&gt; 30
  [nscannedAllPlans] =&gt; 43
  [scanAndOrder] =&gt; 
  [indexOnly] =&gt; 
  [nYields] =&gt; 0
  [nChunkSkips] =&gt; 0
  [millis] =&gt; 0
  [indexBounds] =&gt; Array
  </code></pre>
  
  <p>The part I dont understand is, why mongodb searches 43 documents ?, there are only 30 indexed mongoids, nscanned should be 30, how can I fix this ?</p>