in reply to fetchall_arrayref DBI question ?
It would be better to fetch one row at a time, so long as you are actually processing one row at a time. If you simply fetch one row at a time and build a large array in memory, and then use foreach, you won't be doing yourself any favors. You likely want to use a while loop around your call to fetchrow_arrayref, and operate on each row as it comes out of the database. That way your memory footprint will be minimized.
As to the speed, if your process is forced to page to disk because you're using huge amounts of RAM, it's likely that simply reducing the memory footprint will result in a significant improvement in speed. If you have 1.5GB of data in the DB, you can expect that perl could use three times that much (as a rough figure) to keep that in perl variables/data structures in memory. At the very least, it is worth it for you to try it for yourself and find out.