title: How to determine if a full collection scan has been done in MongoDB
body: <p>I understand that using the output of <code>.explain()</code> on a MongoDB query, you can look at the difference between <code>n</code> and <code>nscanned</code> to determine if a full collection scan has been performed, or if an index has been used. <a href="http://docs.mongodb.org/manual/reference/explain/" rel="noreferrer">The docs</a> state </p>
  
  <blockquote>
    <p>You want <code>n</code> and <code>nscanned</code> to be close in value as possible.</p>
  </blockquote>
  
  <p><a href="http://www.manning.com/banker/" rel="noreferrer">Kyle Banker's excellent book MongoDB in Action</a> says something very similar:</p>
  
  <blockquote>
    <p>Generally speaking, you want the values of <code>n</code> and <code>nscanned</code> to be as close together as possible. When doing a collection scan, this is almost never the case.</p>
  </blockquote>
  
  <p>Clearly neither of these statements are definitive about comparing <code>n</code> and <code>nscanned</code>. What proportion of difference generally infers a full collection scan - 10%, 20%, 30%+? Are there any other ways to check if a full collection scan has been done?</p>