Best way to return Random rows from a table with non-repeatability of rows

From: Kiran <bangalore(dot)kiran(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Best way to return Random rows from a table with non-repeatability of rows
Date: 2016-10-29 11:43:04
Message-ID: CAJfd1U582MsRXqhjt4JMvtTpd0p+f1FAXsRF9Y+zNuXiyZ45xw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear folks,

I have a table with thousands of rows ( currently 15 thousand but will grow
very fast).
I need to return from the query rows which are random and non-repeating.
I know there is random() function, but would like to know from postgresql
practitioners before embarking that path.
Please let me know what is best way to handle this type of queries.

regards
Kiran

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kim Rose Carlsen 2016-10-29 12:55:25 Re: How to hint 2 coulms IS NOT DISTINCT FROM each other
Previous Message Alexander Farber 2016-10-29 11:00:44 Re: WHERE ... IN condition and multiple columns in subquery