title: Best way to select random rows PostgreSQL
body: <p>I want a random selection of rows in PostgreSQL, I tried this:</p>
  <pre><code>select * from table where random() &lt; 0.01;
  </code></pre>
  <p>But some other recommend this:</p>
  <pre><code>select * from table order by random() limit 1000;
  </code></pre>
  <p>I have a very large table with 500 Million rows, I want it to be fast.</p>
  <p>Which approach is better?  What are the differences?  What is the best way to select random rows?</p>