Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Randomly pick
would this not give the same results each time? I can't see this doing
anything other than a full table scan and then filtering. i.e. Oracle would
use the same access path each time?
curious
-- Niall Litchfield Oracle DBA Audit Commission UK "TurkBear" <noone_at_nowhere.com> wrote in message news:taap5t0lrnqke2o7c36qoo983gl3e3noj7_at_4ax.com...Received on Thu Jan 11 2001 - 04:25:24 CST
>
> A simple, altho' not scientifically random in the true sense, is to do a
> non-ordered no index select like:
>
> Select * from big_table where rownum < 100001;
>
> Since data is stored in Oracle in non-defined ( and hence, randomlike )
order
> the100,000 rows returned will be sort of random...
>
> There are better and more scientific methods but if all you need is a
> non-specific set of records, that should do it...
>
>
> "Anna Henson" <anna_henson_at_yahoo.com> wrote:
>
> >Dear Oracle users,
> >
> >Please show me how to write a query to randomly picked 100,000 accounts
from
> >a table that has about 10 million accounts.
> >Thank you for your help.
> >
> >
> >Anna Henson
> >
>
![]() |
![]() |