No help for your memory problem, but a hint for your code: change my $preMonthDB = DBI->connect("DBI:Excel:file=March_15.xls") or die "Cannot connect: " . $DBI::errstr; to my $preMonthDB = DBI->connect("DBI:Excel:file=March_15.xls",'','',{ RaiseError => 1}); and get rid of all of the other or die after DBI method calls. RaiseError enables implicit error checks, even where you forgot the manual error checks.
Also get used to using placeholders instead of pasting literals into the SQL statement, to avoid SQL injection and to enable reuse of prepared statements.
On the other hand, 2.2 GBytes is not that much of RAM on any recent machine. pme++ is right, avoiding DBI and DBD::Excel would avoid some overhead. The SQL statements you use here are quite trivial to replace with a few lines of perl, plus you could run all statistics in a single loop instead of running several times over all of the data.
Alexander
In reply to Re: DBI::Excel Memory usage
by afoken
in thread DBI::Excel Memory usage
by martinslmn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |