Random record from MongoDB
Asked 07 September, 2021
Viewed 1K times
  • 54
Votes

I am looking to get a random record from a huge collection (100 million records).

What is the fastest and most efficient way to do so?

The data is already there and there are no field in which I can generate a random number and obtain a random row.

28 Answer