This question answers the question on how to select a random sample from oracle which is exactly what I need. I do not understand however the difference between that solution
SELECT *
FROM (
SELECT *
FROM mytable
ORDER BY
dbms_random.value
)
WHERE rownum <= 1000
and something like
select * from mytable where rownum<=1000 order by dbms_random.value
When I query using the first method, it takes a long time (still hasn't finished) but when I query using the 2nd method, it's very quick but the results don't seem to be random.
Appreciate and advice/direction y'all can provide.
Thanks!
JC