Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to select random records?
In <3430B9DA.B8B_at_bhp.com.au> Connor McDonald <mcdonald.connor.cs_at_bhp.com.au> writes:
[...]
>If you have a random number generator - why not just have a cursor along
>the lines of:
>cursor x is
> select data, random_number
> from table
> order by 2;
>then just select the first "n" rows that you want...
Suppose you want the 655255th record of a table with >1500000 records. You know what a full table scan is, don't you? ;-)
Regards
Martin
-- Martin Schr"oder, MS_at_Dream.HB.North.DE Do not go where the path may lead, go instead where there is no path and leave a trail. (Ralph Waldo Emerson)Received on Tue Sep 30 1997 - 00:00:00 CDT
![]() |
![]() |