Skip to content

Instantly share code, notes, and snippets.

@greglu
Created December 20, 2010 21:30
Show Gist options
  • Select an option

  • Save greglu/749029 to your computer and use it in GitHub Desktop.

Select an option

Save greglu/749029 to your computer and use it in GitHub Desktop.
// shard_test.js
// we want a lot of data, so lets make a ~50k string to cheat :)
bigString = "";
while ( bigString.length < 50000 )
bigString += "this is a big string. ";
print( "my big string is: " + bigString.length + " characters long" );
// ok, now lets insert a some data
var num = 1;
for ( ; num<200001; num++ ){
db.shard_test2.save( { num : num , bigString : bigString } );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment