title: MongoDB - too much data for sort() with no index error
body: <p>I am using MongoDB 1.6.3, to store a big collection (300k+ records). I added a composite index.</p>
  
  <pre class="lang-json prettyprint-override"><code>db['collection_name'].getIndexes()
  [
      {
          "name" : "_id_",
          "ns" : "db_name.event_logs",
          "key" : {
              "_id" : 1
          }
      },
      {
          "key" : {
              "updated_at.t" : -1,
              "community_id" : 1
          },
          "ns" : "db_name.event_logs",
          "background" : true,
          "name" : "updated_at.t_-1_community_id_1"
      }
  ]
  </code></pre>
  
  <p>However, when I try to run this code:</p>
  
  <pre class="lang-js prettyprint-override"><code>db['collection_name']
    .find({:community_id =&gt; 1})
    .sort(['updated_at.t', -1])
    .skip(@skip)
    .limit(@limit)
  </code></pre>
  
  <p>I am getting:</p>
  
  <blockquote>
    <p>Mongo::OperationFailure (too much data
    for sort() with no index.  add an
    index or specify a smaller limit)</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>