clickhouse-docs icon indicating copy to clipboard operation
clickhouse-docs copied to clipboard

Document merge selection algorithm

Open rschu1ze opened this issue 10 months ago • 0 comments

Our user docs should describe at a high level how the default merge selector algorithm in ClickHouse work (i.e. which parts are selected for merge based on what criteria). The description would fit here or here. We should note that that thresholds and details of the algorithms are not part of the stable database interface, the docs would only apply to the latest version and they may change between versions (this already applies to system tables, for example).

The current heuristics are described

  • here (I was told the logic did not change significantly since 2020), and
  • here (as source code comments). The heuristics were made exchangeable recently and there are more of them but SimpleMergeSelector is the default one.

In case of questions, @Michicosun can help.

rschu1ze avatar Feb 05 '25 11:02 rschu1ze