Skip to content

Instantly share code, notes, and snippets.

@cristopher-rodrigues
Created December 2, 2015 16:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cristopher-rodrigues/ca786f88cf15298b7a2f to your computer and use it in GitHub Desktop.
Save cristopher-rodrigues/ca786f88cf15298b7a2f to your computer and use it in GitHub Desktop.
mongo random find data
db.collection.find().limit(1).skip(_rand()*db.collection.count());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment