diff options
author | dwight <dwight@10gen.com> | 2011-07-15 14:14:08 -0400 |
---|---|---|
committer | dwight <dwight@10gen.com> | 2011-08-02 02:36:36 -0400 |
commit | 81fece68e9b0f1723b9c5d2e468fd2e43794022d (patch) | |
tree | 5f0dbfd3421d63ca8108f7e4e832c6437614be6d /speed.js | |
parent | b1a62743d1ab7f1986bbe7faf36640fc16236b15 (diff) | |
download | mongo-81fece68e9b0f1723b9c5d2e468fd2e43794022d.tar.gz |
prefetch type stuff
Diffstat (limited to 'speed.js')
-rwxr-xr-x | speed.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/speed.js b/speed.js new file mode 100755 index 00000000000..c5aa3a36964 --- /dev/null +++ b/speed.js @@ -0,0 +1,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 );
+
|