Reputation: 1
I am using GeoIP2 mmdb file to find the location of the user in real time. However, I wish to load the file into memory and then query on the hashmap instead of querying on the database every time.
Is it possible to do that.? If yes, How so.?
Also, will loading the whole file into a hashmap increase the performance of my queries.?
Upvotes: 0
Views: 478
Reputation: 1457
I don't think it is possible. The IP address and location is not in a 1-1 reference as in hash. The database is in a range of IP address and you need to query two columns to find the exact location. Hashmap is not a suitable structure.
Upvotes: 0