It looks like you're using Sybase::DBlib or Sybase::CTlib. The nsql routine in those is very convenient, but it's not terribly efficient, because it pulls the entire result set into memory. You may be able to reduce your memory requirement quite a bit by processing a row at a time. Naturally, whether this is a win or not depends on the size of the result set (row width and number of rows).
I'd also suggest consolidating your regular expressions, and where possible, shift some of the work to Sybase. For instance, it looks like you're trying to change NULL and empty columns in your result set to . (dot). Instead of using several regular expressions, you may able to just do something like:
in your SQL. (By the way, you can control whether the Sybase modules will map NULL values to undef or the string NULL with an attribute. I'm not working with Sybase ATM, so I don't have the docs handy.)coalesce(trim(colname),'.')
HTH
In reply to Re: Fast morphing of SYBASE data to flat-file
by VSarkiss
in thread Fast morphing of SYBASE data to flat-file
by singjoh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |