199
|
1 function findDataLoop () {
|
|
2 var date_obj = new Date();
|
|
3 var milliseconds = date_obj.getTime();
|
|
4 for (var i = 1; i<= 50000; i++) {
|
|
5 var personData = db.person1.find({PersonId:"p:9"}).next();
|
|
6 var roleId = personData.roleId
|
|
7 }
|
|
8 date_obj = new Date();
|
|
9 print(date_obj.getTime() - milliseconds)
|
|
10 }
|
|
11
|
|
12 function findData () {
|
|
13 var personVer = db.config.find({configVer:"v:1"}).next().PersonVer;
|
|
14 var personCollection = db.getCollection(personVer);
|
|
15 db.person1.find({PersonId:"p:9"}).next();
|
|
16 }
|