From 12dcfe1f253b8fcf087c94adc9d13018107b32df Mon Sep 17 00:00:00 2001 From: CurtizJ Date: Sat, 27 Jul 2019 03:33:47 +0300 Subject: [PATCH] reduce number of read rows while reading in reverse order --- dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp b/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp index e85e017c47e..667178d940e 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp @@ -826,8 +826,8 @@ BlockInputStreams MergeTreeDataSelectExecutor::spreadMarkRangesAmongStreamsPKOrd auto split_ranges = [max_block_size](const auto & ranges, size_t rows_granularity, size_t num_marks_in_part) { /// Constants is just a guess. - const size_t min_rows_in_range = max_block_size * 4; - const size_t max_num_ranges = 32; + const size_t min_rows_in_range = max_block_size; + const size_t max_num_ranges = 64; size_t min_marks_in_range = std::max( (min_rows_in_range + rows_granularity - 1) / rows_granularity,