Created
July 13, 2011 12:49
-
-
Save balboah/1080234 to your computer and use it in GitHub Desktop.
mongo freebsd bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Save as test.js and run in console with: | |
// time mongo test.js | |
db.users.drop(); | |
for (var i=0; i < 100; i++) { db.users.insert({}); } | |
for (var i=1; i < 100; i++) { | |
var result = db.users.find().limit(1); | |
if (! result.hasNext()) continue; // This check together with the insert below makes it terrible slow | |
db.communications.insert({text: 'testing'}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment