print(db.player.count()) var startDate=new Date(); db.player.find().limit(10).skip((10)).forEach(printResult); print(new Date()-startDate); function printResult (r) { print(tojson(r)) } //http://www.mongodb.org/display/DOCS/Scripting+the+shell //api //http://docs.mongodb.org/manual/reference/javascript/
运行
>mongo.exe shell.js