t = db.cursora function run( n , atomic ){ t.drop() for ( i=0; i 0; } ).sort( { _id : -1 } ).limit(n).itcount() end = new Date() join() print( "num: " + num + " time:" + ( end.getTime() - start.getTime() ) ) assert.eq( 0 , t.count() , "after remove" ) if ( n == num ) print( "warning: shouldn't have counted all n: " + n + " num: " + num ); } run( 1500 ) run( 5000 ) run( 1500 , true ) run( 5000 , true )