leveldb
leveldb copied to clipboard
How can I efficiently create sublevel?
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.