×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 04 Jun 2012 11:58, Albert York wrote:
I have a file that contains around 12 million records. I need a way to
randomize the order of the file in the most efficient method. Does
anyone have any ideas?
As Booth asks effectively... Randomize the order of selection, or the
order of physical records? Either way, the following is a fairly simple
means to effect the unordered data set with a /random/ value in a column:
create view the_file_rand as
( select the_file.*, rand(r) as r
from the_file
)
Then the following SELECT can retrieve the rows in a /random/ order;
that could be directed to a[n ordered] physical copy of the data:
select * /* or specify column list omitting column R */
from the_file_rand
order by r
Regards, Chuck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.