Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5607

cursor iteration constants should be better

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
    • Query
    • ALL

      N = 10000;
      if ( db.foo.count() != N ) {
          db.foo.drop();
          for ( i=0; i<N; i++ ) 
              db.foo.insert( { x: i } );
          db.getLastError();
      }
      
      db.foo.dropIndex( { x : 1 } );
      printjson( db.foo.find( { x : { $gt : 0 } } ).explain() );
      
      db.foo.ensureIndex( { x : 1 } )
      printjson( db.foo.find( { x : { $gt : 0 } } ).explain() );
      
      db.foo.ensureIndex( { x : 1 } )
      printjson( db.foo.find( { x : { $gt : 0 } } , { x : 1 , _id : 0 } ).explain() );
      

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            eliot Eliot Horowitz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: