in reply to multi-dimensional range lookup

A different approach: You seem not to be concerned about memory usage.. so.. . I might try to: The initial heap table will probably be huge, but I am guessing you have plenty of memory.

This is of course a brute force method, and you may have to limit your initial query a bit more. However, once the initial query is done:

Once you are down to the initially required set, further queries will be very, very fast.

Not elegant, but I have done this with large data sets when I don't have the time to mess with re-designing the schema, or coding fancy algorithms (which I am not good at anyway), and it worked great!..

Just a thought....

  • ...the majority is always wrong, and always the last to know about it...
  • The Spice must flow...
  • ..by my will, and by will alone.. I set my mind in motion