Skip to content

System Variables

System Variables

TideSQL registers the variables below. The read-only group is set at server startup and cannot change while the server runs. The dynamic global group can be changed at runtime with SET GLOBAL. The session group can be set per connection with SET SESSION (and its global value is the default new sessions inherit).

Global, read-only, set at startup

VariableDefaultDescription
tidesdb_flush_threads4Background threads flushing memtables to SSTables. 0 lets the library auto-size the shared flush pool to min(CPU count, 4) at open
tidesdb_compaction_threads4Background threads running LSM compaction
tidesdb_log_levelTRACELibrary log level, one of TRACE, INFO, WARN, ERROR, NONE
tidesdb_block_cache_size256 MBSize in bytes of the global block cache shared across all column families
tidesdb_max_open_sstables256Maximum SSTable structures cached in the LRU. 0 means unlimited, bounded only by the process open-file limit
tidesdb_log_to_fileONWrite library logs to a LOG file in the data directory instead of stderr
tidesdb_log_truncation_at24 MBLog file truncation size in bytes. 0 disables truncation
tidesdb_memtable_write_buffer_size256 MBWrite buffer size in bytes for the shared memtable. 0 lets the library auto-size it
tidesdb_memtable_sync_modeFULLWAL durability for every commit, one of NONE, INTERVAL, FULL. See Durability
tidesdb_memtable_sync_interval128000WAL sync interval in microseconds, used only when the sync mode is INTERVAL
tidesdb_memtable_skip_list_max_level0Skip-list max level for the memtable. 0 keeps the library default
tidesdb_memtable_skip_list_probability0.0Skip-list level-promotion probability for the memtable. 0.0 keeps the library default
tidesdb_vlog_segment_size0Size in bytes at which the value log seals a segment and opens a fresh one. 0 keeps the library default
tidesdb_value_separation_threshold0Values at or above this size in bytes go to the shared value log instead of inline in the klog, so compaction rewrites only a reference. Database-wide, applied at open. 0 keeps the library default
tidesdb_memtable_l0_queue_stall_threshold0Sealed-memtable queue depth at which writes are paced for back-pressure. 0 keeps the library default of 16
tidesdb_memtable_idle_flush_seconds-1Seconds of write inactivity after which the shared memtable is flushed even before it fills. -1 keeps the library default
tidesdb_txn_timeout_seconds-1Seconds a transaction may run before the library aborts it. -1 keeps the library default
tidesdb_data_home_dir(auto)Directory for the data files. Defaults to <mysql_datadir>/../tidesdb_data

Global, dynamic

VariableDefaultDescription
tidesdb_backup_dir(empty)Set to a path to trigger an online backup. Clear with an empty string. See Backup
tidesdb_checkpoint_dir(empty)Set to a path to write a consistent checkpoint copy of the data directory to, a durable flush of the WAL, value log, and manifest followed by a byte-for-byte copy. Clear with an empty string
tidesdb_fts_min_word_len3Minimum word length in characters for full-text indexing
tidesdb_fts_max_word_len84Maximum word length in characters for full-text indexing
tidesdb_fts_bm25_k11.2BM25 k1 parameter, term-frequency saturation
tidesdb_fts_bm25_b0.75BM25 b parameter, document-length normalization from 0 to 1
tidesdb_fts_blend_chars(empty)Characters treated as both separators and word characters. Set to ' for Italian and French elision. See Full-Text Search
tidesdb_ft_stopword_tableNULLCustom stop-word table in db_name/table_name form. NULL uses the InnoDB default list, empty string disables stop-word filtering

Session, with a global default

These are session-scoped. Setting one globally changes the default new sessions inherit. The tidesdb_default_* group supplies the default for the matching table option when CREATE TABLE does not set it.

VariableDefaultDescription
tidesdb_ttl0Per-session TTL in seconds applied to INSERT and UPDATE. 0 uses the table default. Works with SET SESSION and SET STATEMENT. See Time-To-Live
tidesdb_skip_unique_checkOFFSkip uniqueness checks on the primary key and unique secondary indexes during INSERT. Safe only when the application guarantees no duplicates
tidesdb_single_delete_primaryOFFUse single-delete semantics on the primary row CF for this session’s DELETEs. See Write-Path Optimizations
tidesdb_compact_after_range_delete_min_rows0After a multi-row DELETE touching at least this many rows, compact the touched primary-key range synchronously. 0 disables it
tidesdb_default_compressionLZ4Default COMPRESSION for new tables
tidesdb_default_bloom_filterONDefault BLOOM_FILTER for new tables
tidesdb_default_bloom_fpr100Default BLOOM_FPR in parts per 10,000, 100 is 1%
tidesdb_default_keep_values_inlineOFFDefault KEEP_VALUES_INLINE for new tables
tidesdb_default_btree_klog_block_size4096Default BTREE_KLOG_BLOCK_SIZE in bytes for new tables. Sizing a node to the block manager first-read window avoids a second read per access
tidesdb_default_l1_file_count_trigger4Default L1_FILE_COUNT_TRIGGER
tidesdb_default_level_size_ratio10Default LEVEL_SIZE_RATIO
tidesdb_default_min_levels1Default MIN_LEVELS
tidesdb_default_dividing_level_offset1Default DIVIDING_LEVEL_OFFSET
tidesdb_default_isolation_levelREPEATABLE_READDefault ISOLATION_LEVEL
tidesdb_default_tombstone_density_trigger0Default TOMBSTONE_DENSITY_TRIGGER in parts per 10,000, 0 disables it
tidesdb_default_tombstone_density_min_entries1024Default TOMBSTONE_DENSITY_MIN_ENTRIES

Setting defaults in my.cnf

[mysqld]
plugin-load-add=ha_tidesdb.so
tidesdb_memtable_sync_mode=NONE
tidesdb_default_compression=NONE
tidesdb_default_bloom_fpr=10
tidesdb_value_separation_threshold=64
-- new tables inherit the global defaults
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=TIDESDB;
-- override one option for one table
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=TIDESDB COMPRESSION='ZSTD';
-- change a default for this session only
SET SESSION tidesdb_default_bloom_fpr = 50;