I am looking to get a random record from a huge (100 million record) mongodb.
mongodb
What is the fastest and most efficient way to do so? The data is already t
Do a count of all records, generate a random number between 0 and the count, and then do:
db.yourCollection.find().limit(-1).skip(yourRandomNumber).next()