This is my environments.
Java - 1.7 by Oracle
mongod v2.4.5 (in Mongolab)
I found difference in performance of the two MongoDB driver(2.9.3 vs 2.11.2)
When I run same code using each driver, 2.11.2 slower than 2.9.3.
for(int i=0; i<1000; i++){
BasicDBObject doc = new BasicDBObject(
"currentTime",
new SimpleDateFormat("HH:mm:ss:SSS").format(Calendar.getInstance().getTime())
);
coll.insert(doc);
}
DBCursor cursor = coll.find();
try{
while(cursor.hasNext()){
System.out.println(cursor.next());
}
} finally {
cursor.close();
}
The above code is to put 1000 document to MongoDB.
In driver 2.9.3, it takes 1~2 sec. but in 2.11.2, it takes more than 1 minute.
Does anyone know anything about this problem?