http://qs321.pair.com?node_id=58996

tadman has asked for the wisdom of the Perl Monks concerning the following question:

Maybe I'm just delusional, but I was under the impression that when using DBI that calling using the execute,prepare,fetch technique meant that the table was retrieved piecewise, as in one row at a time. If you were bold enough to use something like fetchall_arrayref() instead, then you would expect the entire thing to appear in RAM. I haven't been able to find any clarification on the internals of DBI with respect to this particular aspect.

I'm doing something pretty simple on a 9M row table, and yet DBI is chomping up a good 300MB+ of RAM if you should let it run that long:
use DBI; # (Init w. AutoCommit=>1 occurs here) # Prepare the SELECT statement... my ($s) = $db->prepare ("SELECT * FROM table"); # ...and run it. my ($s_rv) = $s->execute(); # Wait patiently, run out of RAM... # Presumably, should be able to fetch data and use it here: while (my @row = $s->fetchrow_array()) { ... }
I'm not making it past the $s->execute() statement, and I don't want to make a trip to RAM Depot® for a bulk purchase.