It is possible to change this behaviour with both DBD::mysql and DBD::pg For DBD::mysql you can give prepare {mysql_use_result => 1}. But be aware that by doing this, you change the behaviour of the rows() method. And for DBD::pg you can use cursors:
$db->do("declare imprecator CURSOR FOR select * from test");
$c = $db->prepare("FETCH 100 FROM imprecator")
for (1..10) { # I have a more robust example somewhere
$c->execute();
print Data::Dumper::Dumper($c->fetchall_arrayref())
}
It would probably be possible to encode this in the driver so you could pass an attribute to prepare {pg_use_cursor =>1}.