summaryrefslogtreecommitdiff
path: root/speed.js
blob: c5aa3a369643e355c71da361744a8a94b3c91587 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 );