compaction will try to recursively detect not only upper DB tables but also subtables, based on number of non-empty prefixes in current domain (if number of prefixes (N) > 1 and < 50, then we're probably looking at N tables). Like in previous version (#384), each detected table is split into S steps (depending on range between first and last keys of the prefix) and compacted
number of compaction steps is scaled based on total DB size. Total DB size estimation is retrieved via Stat. Having too short steps leads to ineffective compaction for small DBs
compaction steps are 4x larger for db compact command and debug_chaindbCompact API call
Stat
. Having too short steps leads to ineffective compaction for small DBsdb compact
command anddebug_chaindbCompact
API call