in reply to question about DBI

With what database? With Oracle, you don't have to fetch a *LOB all at once...see DBD::Oracle. If your database can't do this, then you'll need lots of memory.