ClickHouse Decides Which Parts to Merge: A Cost Model for Write Amplification
ClickHouse picks merge candidates with a tiny, explicit cost model: score each contiguous range as sum_size / (count - 1.9), pick the cheapest admissible one, and only ever…