in reply to Comparing an array to a DBI table

You might be able to minimize memory requirements for the hash strategy by sorting your file in advance and dividing it into chunks; your select can then read only the necessary range. If you really have memory problems perhaps an iterative method might be able to use LIMIT to pull a given number of records and find the range from what you pulled out of the DB.