in reply to Re^4: how to define key for a hash
in thread how to define key for a hash
I mean that for the amount of data and the complexity of queries that you're talking about, using a database will probably be more efficient than trying to manipulate your own in memory data structures.
Will it be fast enough on your system? I have no way of knowing. I suggest trying it and seeing what happens. If there's a problem then come back here for performance tuning suggestions.