dain / leveldb

Port of LevelDB to Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I efficiently create sublevel?

anidotnet opened this issue · comments

How do I efficiently create sublevel db with different comparator? Do you have any example or test case?

Leveldb does not support sublevel with multiple comparators.
You can achieve this by creating a distinct DB for each sublevel or a better approach (depending on the usecase) would be to use a key prefix to differentiate each sublevel and make a single comparator aware of those prefixes/sublevel comparators.