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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Retrieving a set of randomly chosen records (Oracle 9i)

Re: Retrieving a set of randomly chosen records (Oracle 9i)

From: IANAL_VISTA <IANAL_Vista_at_hotmail.com>
Date: Fri, 18 Feb 2005 14:40:53 GMT
Message-ID: <Xns960143F78FEE9SunnySD@68.6.19.6>


"andreas.krisor_at_gmx.net" <andreas.krisor_at_gmx.net> wrote in news:1108736215.318122.236000_at_g14g2000cwa.googlegroups.com:

> Hi,
>
> I need to analyze the data of very large tables (over 10 million
> records). Therefore I want to retrieve a set of randomly chosen records
> (about 50,000).
>
> Question: Exists a predefined function in Oracle 9i, which fetches a
> certain part (e.g. 1%) of the rows of a table?
>
> Hint: Because I need to get all of the data in a random order and not
> in the way the rows are arranged in the table I cannot work with SELECT
> * from xxx WHERE ROWNUM < 50001.
> But maybe the ROWID can be utilized to fetch a random sample of the
> rows?
>
> King regards,
>
> Andreas
>
>

Go lookup the keyword "SAMPLE" as part of the SELECT statement Received on Fri Feb 18 2005 - 08:40:53 CST

Original text of this message

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