I have found that a '*' select statement ( no where clause or order by
clause) will return a 'random' set of records from a table ( Random in this case
meaning in no particular order ) since the 'order' of records stored by Oracle
is random in nature...while this is certainly not a true random sample, I find
it works for most sampling tasks...
>> I went fishing for some guidance on how to produce a random sample from a
>> large table, but found nothing specific. Could you please assist me as to
>> how I can draw a random sample (or any other sampling method: layered,
>> clustered, etc) from a database? I will be most greatful if you do.
>> Thank you -
>> Hagai Katz
>> Acting Director, The Israeli third-Sector Database,
>> ICTR - the Israeli Center for Third-sector Research
>> Ben Gurion University of the Negev,
>> Beer Sheva, Israel.
>If you're on 8i, there is a SAMPLE clause in SQL to do exactly that.
>On releases before this, using rownum combined with a random number
>generator can assist although its not too efficient. A little more
>complex but more efficient is to generate pseudo-rowid ranges
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.veryComputer.com/ The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----