Issue with Hash Map Space and Performance

不羁岁月 提交于 2019-12-02 03:30:31

问题


I have to store more than 100 millions of key-values in my HashMultiMap (key can have multiple values). Can anybody help me which one is faster for both storing and searching:

1) Berkeley DB

2) Tokyo Cabinet

3) H2

4) EhCache

5) Or anyothers

Another point, is performance of those approximately identical to in-memory hash map ? A little bit guidance will be more helpful. Thanks.

NB: information about any one of these is also helpful.


回答1:


I'd recommend Redis. It's more of a data structure store than the others (e.g. it supports maps and sets) and requires very little effort to get started with. It's incredibly simple to use and has a great Java API.

I'd start by looking at the functions here that allow you to associate a key with a group of values.




回答2:


I would have a look at leveldb, because it claims to be faster than Kyoto Cabinet. Other interesting libraries are Kyoto Cabinet, and JDBM3.

Those are low level libraries (without support for relational queries or SQL). Some offer transactional support, but I'm not sure if you need it. Still, in-memory hash maps are faster.



来源:https://stackoverflow.com/questions/9944582/issue-with-hash-map-space-and-performance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!