The xSQL configuration file can be used to define database parameters corresponding to the C API
mco_db_params_tstructure.For an overview see page Configuration File Parameters
The
db_paramssection consists of a set of "name : value" pairs enclosed within braces. For example:db_params : { mem_page_size : 256, disk_page_size : 4096, db_max_connections : 100, ... }The following table lists the possible options for the
db_paramssection with the corresponding C API structures and values specified in the comment:
Option name : example value Comment mem_page_size : 256, In-memory page size ( mco_db_params_t::mem_page_size), unsigned.disk_page_size : 4096, Disk page size ( mco_db_params_t::disk_page_size), unsigneddb_max_connections : 100, Max number of connections ( mco_db_params_t::db_max_connections), unsigneddisk_max_database_size : 0, Max size of persistent database ( mco_db_params_t::disk_max_database_size), unsignedfile_extension_quantum : 0, Quantum of increase in the size of the database file ( mco_db_params_t::file_extension_quantum), unsigneddb_log_type : redo, Database logging method (
mco_db_params_t::db_log_type), one of
no(NO_LOG),
redo(REDO_LOG) or
undo(UNDO_LOG)aio_queue_length : 20000, Asynchronous I/O queue length (default is 10007) additional_heap_size : 3m, Additional heap memory (this can be necessary when altering or dropping tables) hash_load_factor : 100, Criteria of hash reallocation in percent of used items ( mco_db_params_t::hash_load_factor), unsignedindex_optimistic_lock_threshold : 100, Maximum number of active write transactions when optimistic locking of B-Tree indexes can be performed log_params: {...} Log settings ( mco_db_params_t::log_params) (See below Log Params )mode_mask : [], Open mode mask (
mco_db_params_t::mode_mask), combination of
mvcc_auto_vacuum(MCO_DB_MODE_MVCC_AUTO_VACUUM),
smart_index_insert(MCO_DB_MODE_SMART_INDEX_INSERT),
open_existing(MCO_DB_OPEN_EXISTING),
use_crc_check(MCO_DB_USE_CRC_CHECK),
transient(MCO_DB_TRANSIENT),
lazy_mem_initialization(MCO_DB_LAZY_MEM_INITIALIZATION),
mursiw_disk_commit_optimization(MCO_DB_MURSIW_DISK_COMMIT_OPTIMIZATION),
bulk_write_modified_pages(MCO_DB_BULK_WRITE_MODIFIED_PAGES),
index_preload(MCO_DB_INDEX_PRELOAD) ,
disable_nested_transactions (MCO_DB_DISABLE_NESTED_TRANSACTIONS),
disable_implicit_rollback (MCO_DB_DISABLE_IMPLICIT_ROLLBACK),
inmemory_protection (MCO_DB_INMEMORY_PROTECTION),
inmemory_compression (MCO_DB_INMEMORY_COMPRESSION),
inclusive_btree(MCO_DB_INCLUSIVE_BTREE) ,
separate_bitmap (MCO_DB_SEPARATE_BITMAP),
disable_btree_rebalance_on_delete (MCO_DB_DISABLE_BTREE_REBALANCE_ON_DELETE),
auto_rollback_first_phase (MCO_DB_AUTO_ROLLBACK_FIRST_PHASE),
mvcc_compatibility_mode (MCO_DB_MVCC_COMPATIBILITY_MODE),
disable_page_pool_reserve (MCO_DB_DISABLE_PAGE_POOL_RESERVE),
redo_log_optimization (MCO_DB_REDO_LOG_OPTIMIZATION),
disable_hot_updates (MCO_DB_DISABLE_HOT_UPDATES),
sql_autocheckpoint (MCO_DB_SQL_AUTOCHECKPOINT),
read_only (MCO_DB_MODE_READ_ONLY),
use_aio(MCO_DB_USE_AIO),
incremental_backup (MCO_DB_INCREMENTAL_BACKUP),
mvcc_table_level_locking (MCO_DB_MVCC_TABLE_LEVEL_LOCKING)min_conn_local_pages : 256, Minimum number of pages in per-connection allocator ( mco_db_params_t::min_conn_local_pages), unsignedmax_conn_local_pages : 1024, Maximum number of pages in per-connection allocator ( mco_db_params_t::max_conn_local_pages), unsignedallocation_bitmap_caching_priority : 0, Priority of allocator bitmap pages in LRU page pool ( mco_db_params_t::allocation_bitmap_caching_priority), integerindex_caching_priority : 0, Priority of index pages in LRU page pool ( mco_db_params_t::index_caching_priority), integerobject_caching_priority : 0, Priority of object (non-blob) pages in LRU page pool ( mco_db_params_t::object_caching_priority), integercipher_key : "secret", Database encryption key ( mco_db_params_t::cipher_key), string (see page Encryption and Compression for details.)dynamic_hash : true, Dynamically extend hash table when number of items exceeds load factor ( mco_db_params_t::dynamic_hash), booleanlicense_key : "ABCABCABCABC", # eXtremeDB license key ( mco_db_params_t::license_key) ,stringddl_dict_size :64K, # Used to reserve space for the dictionary in the database header to allow dynamic table creation ( mco_db_params_t::ddl_dict_size), unsignedmax_classes : 100, Used to reserve space for classes in the database header to allow dynamic table creation ( mco_db_params_t::max_classes), unsignedmax_indexes : 100, Used to reserve space for indexes in the database header to allow dynamic table creation ( mco_db_params_t::max_indexes), unsignedautocompact_threshold : 100k, Size of object after reaching which mco_w_compact()is called during transaction commit (mco_db_params_t::autocompact_threshold), unsignedtrans_sched_policy : fifo Scheduling policy for transactions with the same priority (
mco_db_params_t::trans_sched_policy). One of
fifo(MCO_SCHED_FIFO),
reader_favor(MCO_SCHED_READER_FAVOR) or
writer_favor(MCO_SCHED_WRITER_FAVOR)max_active_pages: 32, Maximum number of pages accessed by connection ( mco_db_params_t::max_active_pages), unsignedpage_hash_bundles: 8, Number of bundles in encryption / protection / compression page hash ( mco_db_params_t::page_hash_bundles), unsignedcompression_level: 0, Compression level ( mco_db_params_t::compression_level), 0..9, 0 = no compressioncompression_mask: 0x1, Bitmap of page kinds which should be compressed, ( mco_db_params_t::compression_mask), unsignedexpected_compression_ratio: 10, Used to allocate page map: virtual database space can not be larger than physical size * compression ratio, ( mco_db_params_t::expected_compression_ratio), unsignedbtree_cursor_read_ahead_size : 3, Number of keys taken from a leaf B-Tree page at each access, cannot be larger than MCO_CFG_CURSOR_BUF_SIZE, (mco_db_params_t::btree_cursor_read_ahead_size), unsignedmvcc_bitmap_size MVCC bitmap size (should be power of two) additional_heap_size Heap memory used by various internal DB functionalities, mostly for buffering during heap memory used by various internal DB functionalities cow_pagemap_size Size of copy-on-write MVCC pagemap (in bytes, one byte per disk page) backup_map_size Size of backup counters array, bytes, power of two, ignored if disk_max_database_sizeset to zero to disable backup featurebackup_min_pages Number of pages for last exclusive pass of backup procedure (set to zero to disable threshold) backup_max_passes Max number of passes before exclusive pass of backup procedure backup_map_filename Name of a file will be used to store backup temporary data on
mco_db_close()call eXtremeDB will use file system wrapper linked into the process to store the data optional (set zero for default "<persistent-storage>.bmap" file located at the same location as persistent storage file)iot_agent_id The IoT agent Identifier file_backup_delay The delay in milliseconds between writing backup blocks; to minimize backup impact on performance; default is 0 - no delay. (See File Backup) Log Params
The following table lists the possible options for the
log_paramssection with the corresponding C API structures and values specified in the comment: