v.25.1Improvement
Make max_bytes_before_external_sort Limit Based on Total Query Memory Consumption and Introduce min_external_sort_block_bytes Setting
Makemax_bytes_before_external_sortlimit depends on total query memory consumption (previously it was number of bytes in the sorting block for one sorting thread, now it has the same meaning asmax_bytes_before_external_group_by- it is total limit for the whole query memory for all threads). Also one more setting added to control on disk block size -min_external_sort_block_bytes. #72598 (Azat Khuzhin).