Skip to content
Snippets Groups Projects
options.rst 46.25 KiB

Options creation

Options objects

Important

The default values mentioned here, describe the values of the C++ library only. This wrapper does not set any default value itself. So as soon as the rocksdb developers change a default value this document could be outdated. So if you really depend on a default value, double check it with the according version of the C++ library.

CompactionPri

CompressionTypes

BytewiseComparator

BloomFilterPolicy

LRUCache

TableFactories

Currently RocksDB supports two types of tables: plain table and block-based table. Instances of this classes can assigned to :py:attr:`rocksdb.Options.table_factory`

  • Block-based table: This is the default table type that RocksDB inherited from LevelDB. It was designed for storing data in hard disk or flash device.
  • Plain table: It is one of RocksDB's SST file format optimized for low query latency on pure-memory or really low-latency media.

Tutorial of rocksdb table formats is available here: https://github.com/facebook/rocksdb/wiki/A-Tutorial-of-RocksDB-SST-formats

MemtableFactories

RocksDB has different classes to represent the in-memory buffer for the current operations. You have to assing instances of the following classes to :py:attr:`rocksdb.Options.memtable_factory`. This page has a comparison the most popular ones. https://github.com/facebook/rocksdb/wiki/Hash-based-memtable-implementations