2022-11-27 23:41:31 +00:00
|
|
|
|
-- { 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)
|
2023-08-29 13:38:51 +00:00
|
|
|
|
MergeTreeSelect(pool: ReadPoolInOrder, algorithm: InOrder) × 4 0 → 1
|
2022-11-27 23:41:31 +00:00
|
|
|
|
(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)
|
2023-08-29 13:38:51 +00:00
|
|
|
|
MergeTreeSelect(pool: ReadPoolInOrder, algorithm: InOrder) × 4 0 → 1
|
2022-11-27 23:41:31 +00:00
|
|
|
|
(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)
|
2023-08-29 13:38:51 +00:00
|
|
|
|
MergeTreeSelect(pool: ReadPoolInOrder, algorithm: InOrder) × 4 0 → 1
|
2022-11-27 23:41:31 +00:00
|
|
|
|
(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
|
2023-02-03 13:34:18 +00:00
|
|
|
|
1000000
|
2022-11-27 23:41:31 +00:00
|
|
|
|
-- { echoOn } --
|
2023-02-03 13:34:18 +00:00
|
|
|
|
explain pipeline select a from pr_t group by a order by a limit 5 offset 500;
|
2022-11-27 23:41:31 +00:00
|
|
|
|
(Expression)
|
|
|
|
|
ExpressionTransform
|
|
|
|
|
(Limit)
|
|
|
|
|
Limit
|
|
|
|
|
(Sorting)
|
|
|
|
|
MergingSortedTransform 4 → 1
|
|
|
|
|
MergeSortingTransform × 4
|
|
|
|
|
LimitsCheckingTransform × 4
|
|
|
|
|
PartialSortingTransform × 4
|
|
|
|
|
(Expression)
|
|
|
|
|
ExpressionTransform × 4
|
|
|
|
|
(MergingAggregated)
|
2023-04-05 11:32:46 +00:00
|
|
|
|
Resize 1 → 4
|
|
|
|
|
SortingAggregatedTransform 4 → 1
|
|
|
|
|
MergingAggregatedBucketTransform × 4
|
|
|
|
|
Resize 1 → 4
|
|
|
|
|
GroupingAggregatedTransform 3 → 1
|
2023-08-14 16:04:58 +00:00
|
|
|
|
(ReadFromRemoteParallelReplicas)
|
2023-02-03 13:34:18 +00:00
|
|
|
|
select a, count() from pr_t group by a order by a limit 5 offset 500;
|
2022-11-27 23:41:31 +00:00
|
|
|
|
500 1000
|
|
|
|
|
501 1000
|
|
|
|
|
502 1000
|
|
|
|
|
503 1000
|
|
|
|
|
504 1000
|
2023-02-03 13:34:18 +00:00
|
|
|
|
select a, count() from pr_t group by a, b order by a limit 5 offset 500;
|
2022-11-27 23:41:31 +00:00
|
|
|
|
500 1000
|
|
|
|
|
501 1000
|
|
|
|
|
502 1000
|
|
|
|
|
503 1000
|
|
|
|
|
504 1000
|