Tkrzw
|
Tuning parameters for the database. More...
#include <tkrzw_dbm_tree.h>
Public Member Functions | |
TuningParameters () | |
Constructor. More... | |
![]() | |
TuningParameters () | |
Constructor. More... | |
Public Attributes | |
int32_t | max_page_size = -1 |
The maximum size of a page. More... | |
int32_t | max_branches = -1 |
The maximum number of branches each inner node can have. More... | |
int32_t | max_cached_pages = -1 |
The maximum number of cached pages. More... | |
KeyComparator | key_comparator = nullptr |
The comparator of record keys. More... | |
![]() | |
UpdateMode | update_mode = UPDATE_DEFAULT |
How to update the database file. More... | |
int32_t | offset_width = -1 |
The width to represent the offset of records. More... | |
int32_t | align_pow = -1 |
The power to align records. More... | |
int64_t | num_buckets = -1 |
The number of buckets for hashing. More... | |
int32_t | fbp_capacity = -1 |
The capacity of the free block pool. More... | |
bool | lock_mem_buckets = false |
Whether to lock the memory for the hash buckets. More... | |
Tuning parameters for the database.
tkrzw::TreeDBM::TuningParameters::TuningParameters | ( | ) |
Constructor.
int32_t tkrzw::TreeDBM::TuningParameters::max_page_size = -1 |
The maximum size of a page.
If the size of a page exceeds this value, the page is divided into two. -1 means that the default value 4081 is set. -1 means that the default value 8130 is set.
int32_t tkrzw::TreeDBM::TuningParameters::max_branches = -1 |
The maximum number of branches each inner node can have.
The more the number of branches is, the less number of inner nodes occur. If the number is too large, updating performance deteriorates. -1 means that the default value 256 is set.
int32_t tkrzw::TreeDBM::TuningParameters::max_cached_pages = -1 |
The maximum number of cached pages.
The more this value is, the better performance is whereas memory usage is increased. -1 means that the default value 10000 is set. As this parameter is not saved as a metadata of the database, it should be set each time when opening the database.
KeyComparator tkrzw::TreeDBM::TuningParameters::key_comparator = nullptr |
The comparator of record keys.
Records are put in the ascending order of this function. If this is one of built-in comparators, the type is stored in the database. Otherwise, the custom comparator must be specified every time when the database is opened. nullptr means that the default comparator LexicalKeyComparator is set.