mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
14 lines
243 B
JavaScript
14 lines
243 B
JavaScript
|
t = db.fooo;
|
||
|
t.drop();
|
||
|
x = { str:'aaaabbbbcc' }
|
||
|
s = new Date();
|
||
|
for( var i = 0; i < 100000; i++ ) {
|
||
|
x.i = i;
|
||
|
t.insert(x);
|
||
|
}
|
||
|
print( (new Date())-s );
|
||
|
t.ensureIndex({x:1});
|
||
|
t.ensureIndex({str:1});
|
||
|
print( (new Date())-s );
|
||
|
|