Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am a Perl newbie and unsure if perl or awk is the right solution for my problem. Any advice will be much appreciated.
I am working on a tab-delimtied ASCII file with about 20 million records. Fields 15 and 16 of each record must be of fixed-length:
Field 15 -> always 5 characters
Field 16 -> always 7 characters
But there are a few bad records that don't meet this condition. My task is to filter these bad records into a separate file.
What is the most optimal way of determining this?
Note: When I ran a simple query (using awk) to find a specific primary key it took over 20 minutes to find the record.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Performance challenges
by dragonchild (Archbishop) on Mar 22, 2006 at 12:21 UTC | |
by Eimi Metamorphoumai (Deacon) on Mar 22, 2006 at 18:24 UTC | |
by Anonymous Monk on Mar 22, 2006 at 13:31 UTC | |
|
Re: Performance challenges
by Melly (Chaplain) on Mar 22, 2006 at 12:09 UTC | |
by salva (Canon) on Mar 22, 2006 at 12:17 UTC |