in reply to fetchall_arrayref DBI question ?

It may not be as simple as calling fetchrow instead of fetchall. Each database and driver behave differently with respect to how they ferry data between the database and your program. You say you're using SQLite, and I don't know what the recipe is for that one to tell it to move one row at a time. Maybe it's the default, although most of them buffer many rows at once for speed. In any case, I think you should check the SQLite docs for information on how to control buffering of query results. If there's a SQLite mailing list, you might ask there, or on the dbi-users list.