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

cursor iteration constants should be better

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • Query
    • ALL

    Description

      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() );

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: