in reply to Re^2: Reducing memory footprint when doing a lookup of millions of coordinates
in thread Reducing memory footprint when doing a lookup of millions of coordinates

The database is a really good idea. I doubt that SQLite keeps the whole database file in memory itself. Could even locate the file to ram disk or similar as a speed bonus.

You can still use the same code though to do the lookups (with minor modifications):

  1. Get a unique list of all chr.
  2. Foreach chr retrieve all entires (using retrieve_hashref)
  3. use existing code (but work on hashrefs).
  • Comment on Re^3: Reducing memory footprint when doing a lookup of millions of coordinates