v.24.2Improvement
Added Settings for Query Optimization and Debugging in ClickHouse
Added settingssplit_parts_ranges_into_intersecting_and_non_intersecting_finalandsplit_intersecting_parts_ranges_into_layers_final. These settings are needed to disable optimizations for queries withFINALand needed for debug only. #59705 (Maksim Kita). Actually not only for that - they can also lower memory usage at the expense of performance.
Why it matters
These settings allow users to disable certain internal optimizations applied during queries with theFINAL modifier, primarily for debugging purposes. Additionally, they help reduce memory consumption at the cost of query performance, giving users flexibility to balance resource usage and speed.How to use it
Users can enable or disable these optimizations by settingsplit_parts_ranges_into_intersecting_and_non_intersecting_final and split_intersecting_parts_ranges_into_layers_final in their session or server configuration. Setting them to false disables the optimizations, which is useful for debugging or lowering memory usage.