This is not an ideal answer, but it will be much better.
SELECT * FROM ( SELECT * FROM mytable sample (0.01) ORDER BY dbms_random.value ) WHERE rownum <= 1000
The sample will give you a percentage of your actual table, if you really want 1000 rows, you will need to adjust this number. Most often, I just need an arbitrary number of lines, so I do not limit my results. In my database with 2 million rows, I get 2 seconds versus 60 seconds.
select * from mytable sample (0.01)
Arturo Hernandez Aug 26 '13 at 16:50 2013-08-26 16:50
source share