title: Rails—get a random record from db?
body: <p>To get a single random record from the db, I'm currently doing:</p>
  
  <p><code>User.all.sample</code></p>
  
  <p>But when there are 100000+ users, it takes a few seconds to load them all, just to select one.</p>
  
  <p>What's the simplest way to get load a single random user from db?</p>