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


in reply to Posgres batch read with DBI?

Perhaps something like:

while($row = shift(@$rowcache) || shift(@{$rowcache=$sth->fetchall_arr +ayref(undef, $max_rows)})) { ... }