in reply to multi-dimensional range lookup

This takes a long time
What do you mean by "a long time"? Seconds, minutes, hours?

Normally a good database should find an answer to your query quite fast using indices on all columns. After all, databases are purpose built for such look-ups! What type of database are you using?

Getting all the data from the database into an in-memory datastructure will take quite some time too, so the initial start-up cost will be significant and hoping you can keep everything in RAM and the computer does not start swapping it out to swap-space.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law