also seems to suggest that using ORDER BY RANDOM() will perform poorly on Postgres.
I'm just wondering if this is still the case?
I just ran those benchmarks on my system (Postgres 9.2.4), and using ORDERY BY RANDOM did not seem substantially to generating random integers in Python and picking those out (and handling non-existent rows).
Has Postgres's behaviour for ORDER BY RANDOM change sometime recently?