in reply to Re^2: external sort performance improved?
in thread external sort performance improved?
i am currently hitting with the insufficient memory issue when I run this command on my system.
With 12GB of memory and a 5GB file, this should not be happening.
When you hit an error, if you post the error message you receive -- cut&paste rather than paraphrased -- you may get a quick solution to your problem.
.By the way, can this command be used in script and run?
What kind of script?
or is it perl one liners?
It is a bog standard windows command.
It can be invoked: from the command line; from a batch script; from a perl script; or in any other way a system command can be invoked.
Also how is it different from external sort that I have used and now what you have mentioned?
The perl script you showed calls back into perl for every comparison; and (unnecessarially) re-splits two lines for every comparison.
Assuming your example snippet lines are representative of the whole file; and assuming average number of N*log2(N) comparisons are required to sort your file, that means you are calling back into Perl 1.5 billion times and re-spliting lines 3 billion times.
It is unsurprising that a dedicated sort utility that doesn't need to do either of those things will run more quickly.
Please clarify
You are sorting your data by the 1 field that appears at the beginning of each record, therefore there is no need to split the records in order to sort them correctly.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: external sort performance improved?
by rkshyam (Acolyte) on Apr 17, 2012 at 09:00 UTC | |
by BrowserUk (Patriarch) on Apr 17, 2012 at 10:22 UTC | |
by rkshyam (Acolyte) on Apr 18, 2012 at 09:51 UTC | |
by BrowserUk (Patriarch) on Apr 18, 2012 at 22:39 UTC | |
by rkshyam (Acolyte) on Apr 20, 2012 at 10:07 UTC | |
| |
by Anonymous Monk on Apr 18, 2012 at 10:09 UTC |