ClickHouse/tests/queries/0_stateless/02404_memory_bound_merging.reference
Nikita Taranov 8ed5cfc265
Memory bound merging for distributed aggregation in order (#40879)
* impl

* fix style

* make executeQueryWithParallelReplicas similar to executeQuery

* impl for parallel replicas

* cleaner code for remote sorting properties

* update test

* fix

* handle when nodes of old versions participate

* small fixes

* temporary enable for testing

* fix after merge

* Revert "temporary enable for testing"

This reverts commit cce7f8884c.

* review fixes

* add bc test

* Update src/Core/Settings.h
2022-11-28 00:41:31 +01:00

142 lines
5.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- { echoOn } --
explain pipeline select a from remote(test_cluster_two_shards, currentDatabase(), t) group by a;
(Expression)
ExpressionTransform × 4
(MergingAggregated)
MergingAggregatedBucketTransform × 4
Resize 1 → 4
FinishAggregatingInOrderTransform 2 → 1
(Union)
(Aggregating)
SortingAggregatedForMemoryBoundMergingTransform 4 → 1
MergingAggregatedBucketTransform × 4
Resize 1 → 4
FinishAggregatingInOrderTransform 4 → 1
AggregatingInOrderTransform × 4
(Expression)
ExpressionTransform × 4
(ReadFromMergeTree)
MergeTreeInOrder × 4 0 → 1
(ReadFromRemote)
select a from remote(test_cluster_two_shards, currentDatabase(), t) group by a order by a limit 5 offset 100500;
100500
100501
100502
100503
100504
explain pipeline select a from remote(test_cluster_two_shards, currentDatabase(), dist_t) group by a;
(Expression)
ExpressionTransform × 4
(MergingAggregated)
MergingAggregatedBucketTransform × 4
Resize 1 → 4
FinishAggregatingInOrderTransform 2 → 1
(Union)
(MergingAggregated)
SortingAggregatedForMemoryBoundMergingTransform 4 → 1
MergingAggregatedBucketTransform × 4
Resize 1 → 4
FinishAggregatingInOrderTransform 2 → 1
(Union)
(Aggregating)
SortingAggregatedForMemoryBoundMergingTransform 4 → 1
MergingAggregatedBucketTransform × 4
Resize 1 → 4
FinishAggregatingInOrderTransform 4 → 1
AggregatingInOrderTransform × 4
(Expression)
ExpressionTransform × 4
(ReadFromMergeTree)
MergeTreeInOrder × 4 0 → 1
(ReadFromRemote)
(ReadFromRemote)
select a from remote(test_cluster_two_shards, currentDatabase(), dist_t) group by a order by a limit 5 offset 100500;
100500
100501
100502
100503
100504
1
-- { echoOn } --
explain pipeline select a, count() from dist_t_different_dbs group by a order by a limit 5 offset 500;
(Expression)
ExpressionTransform
(Limit)
Limit
(Sorting)
MergingSortedTransform 4 → 1
MergeSortingTransform × 4
LimitsCheckingTransform × 4
PartialSortingTransform × 4
(Expression)
ExpressionTransform × 4
(MergingAggregated)
MergingAggregatedBucketTransform × 4
Resize 1 → 4
FinishAggregatingInOrderTransform 2 → 1
(Union)
(Aggregating)
SortingAggregatedForMemoryBoundMergingTransform 4 → 1
MergingAggregatedBucketTransform × 4
Resize 1 → 4
FinishAggregatingInOrderTransform 4 → 1
AggregatingInOrderTransform × 4
(Expression)
ExpressionTransform × 4
(ReadFromMergeTree)
MergeTreeInOrder × 4 0 → 1
(ReadFromRemote)
select a, count() from dist_t_different_dbs group by a order by a limit 5 offset 500;
500 2000
501 2000
502 2000
503 2000
504 2000
select a, count() from dist_t_different_dbs group by a, b order by a limit 5 offset 500;
500 2000
501 2000
502 2000
503 2000
504 2000
-- { echoOn } --
explain pipeline select a from dist_pr_t group by a order by a limit 5 offset 500;
(Expression)
ExpressionTransform
(Limit)
Limit
(Sorting)
MergingSortedTransform 4 → 1
MergeSortingTransform × 4
LimitsCheckingTransform × 4
PartialSortingTransform × 4
(Expression)
ExpressionTransform × 4
(MergingAggregated)
MergingAggregatedBucketTransform × 4
Resize 1 → 4
FinishAggregatingInOrderTransform 3 → 1
(Union)
(Aggregating)
SortingAggregatedForMemoryBoundMergingTransform 4 → 1
MergingAggregatedBucketTransform × 4
Resize 1 → 4
FinishAggregatingInOrderTransform 4 → 1
AggregatingInOrderTransform × 4
(Expression)
ExpressionTransform × 4
(ReadFromMergeTree)
MergeTreeInOrder × 4 0 → 1
(ReadFromRemoteParallelReplicas)
select a, count() from dist_pr_t group by a order by a limit 5 offset 500;
500 1000
501 1000
502 1000
503 1000
504 1000
select a, count() from dist_pr_t group by a, b order by a limit 5 offset 500;
500 1000
501 1000
502 1000
503 1000
504 1000