Reducing the filesize sounds dubious if the 400 MB is realistic for the requirement.
If a relational database isn't available as an intermediate indexed repository, in which case I'd use that plus
DBI, there is always the C-ISAM file as an intermediate indexed file for AIX. That has meximum 8MTb indexed filesize which can be written unsorted and read back sorted by multiple keys with Perl using
isam or
cisam. Actually, I'd go the C-ISAM route anyway for 400 MB if possible because it functions more quickly than most relational solutions.
__________________________________________________________________________________
^M Free your mind!