title: How avoid pooling data in memory. When iterate cursor object in pymongo?
body: <p>How avoid pooling data in memory. When iterate cursor object in pymongo?</p>
  
  <p>Example:</p>
  
  <pre><code>def iter():
      c=pymongo.Connection()
      cursor=c.db.media.find().skip(0).limit(50000)
      for item in cursor:
          yield item
  </code></pre>
  
  <p>Before it goes in cycle  <code>for</code> there is pause about 2 minus. It loads all data in memory before start iterate for some reason. Can i somehow avoid it?</p>
  
  <p>If I do it in mongodb shell everything is ok.</p>