On 2011-08-07 17:28, Ramprasad Prasad wrote:

I have a file that contains records of customer interaction
The first column of the file is the batch number(INT) , and other columns
are date time , close time etc etc

I have to sort the entire file in order of the first column .. but the
problem is that the file is extremely huge.

For the largest customer it contains 1100 million records and the file is
44GB !
how can I sort this big a file

I would use MySQL.

An alternative is the Linux sort executable.

To split up the file, as Shawn suggested, you could use Perl.
Split for example based on a few initial characters.
Then sort each file independently, and concat them.
(BTW, are the rows representing fixed-width records?)

Using a database is fine for this. I think you must have been using it wrongly.

--
Ruud

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to