Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Randomly pick

Re: Randomly pick

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Thu, 11 Jan 2001 10:25:24 -0000
Message-ID: <93k1mo$ic2$1@soap.pipex.net>

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...

>
> 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
> >
>
Received on Thu Jan 11 2001 - 04:25:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US