Improve point lookup speed

This commit is contained in:
Andrea Cavalli 2022-04-19 23:23:32 +02:00
parent 735be8ecb8
commit f5cb2d8895

View File

@ -63,6 +63,7 @@ import org.rocksdb.CompactionPriority;
import org.rocksdb.CompressionOptions;
import org.rocksdb.CompressionType;
import org.rocksdb.DBOptions;
import org.rocksdb.DataBlockIndexType;
import org.rocksdb.DbPath;
import org.rocksdb.Env;
import org.rocksdb.FlushOptions;
@ -280,6 +281,10 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
columnFamilyOptions.setMaxWriteBufferNumber(4);
}
tableOptions
// http://rocksdb.org/blog/2018/08/23/data-block-hash-index.html
.setDataBlockIndexType(DataBlockIndexType.kDataBlockBinaryAndHash)
// http://rocksdb.org/blog/2018/08/23/data-block-hash-index.html
.setDataBlockHashTableUtilRatio(0.75)
// https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters
.setPinTopLevelIndexAndFilter(true)
// https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters