mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
Revert "Improve 01730_distributed_group_by_no_merge_order_by_long"
This commit is contained in:
parent
dc852568c0
commit
6e40cad785
@ -2,7 +2,7 @@ drop table if exists data_01730;
|
|||||||
|
|
||||||
-- does not use 127.1 due to prefer_localhost_replica
|
-- does not use 127.1 due to prefer_localhost_replica
|
||||||
|
|
||||||
select * from remote('127.{2..11}', view(select * from numbers(1e6))) group by number order by number limit 20 settings distributed_group_by_no_merge=0, max_memory_usage='100Mi'; -- { serverError MEMORY_LIMIT_EXCEEDED }
|
select * from remote('127.{2..11}', view(select * from numbers(1e6))) group by number order by number limit 20 settings distributed_group_by_no_merge=0, max_memory_usage='100Mi'; -- { serverError 241 }
|
||||||
-- no memory limit error, because with distributed_group_by_no_merge=2 remote servers will do ORDER BY and will cut to the LIMIT
|
-- no memory limit error, because with distributed_group_by_no_merge=2 remote servers will do ORDER BY and will cut to the LIMIT
|
||||||
select * from remote('127.{2..11}', view(select * from numbers(1e6))) group by number order by number limit 20 settings distributed_group_by_no_merge=2, max_memory_usage='100Mi';
|
select * from remote('127.{2..11}', view(select * from numbers(1e6))) group by number order by number limit 20 settings distributed_group_by_no_merge=2, max_memory_usage='100Mi';
|
||||||
|
|
||||||
@ -10,12 +10,11 @@ select * from remote('127.{2..11}', view(select * from numbers(1e6))) group by n
|
|||||||
-- and the query with GROUP BY on remote servers will first do GROUP BY and then send the block,
|
-- and the query with GROUP BY on remote servers will first do GROUP BY and then send the block,
|
||||||
-- so the initiator will first receive all blocks from remotes and only after start merging,
|
-- so the initiator will first receive all blocks from remotes and only after start merging,
|
||||||
-- and will hit the memory limit.
|
-- and will hit the memory limit.
|
||||||
select * from remote('127.{2..11}', view(select * from numbers(1e6))) group by number order by number limit 1e6 settings distributed_group_by_no_merge=2, max_memory_usage='100Mi'; -- { serverError MEMORY_LIMIT_EXCEEDED }
|
select * from remote('127.{2..11}', view(select * from numbers(1e6))) group by number order by number limit 1e6 settings distributed_group_by_no_merge=2, max_memory_usage='100Mi'; -- { serverError 241 }
|
||||||
|
|
||||||
-- with optimize_aggregation_in_order=1 remote servers will produce blocks more frequently,
|
-- with optimize_aggregation_in_order=1 remote servers will produce blocks more frequently,
|
||||||
-- since they don't need to wait until the aggregation will be finished,
|
-- since they don't need to wait until the aggregation will be finished,
|
||||||
-- and so the query will not hit the memory limit error.
|
-- and so the query will not hit the memory limit error.
|
||||||
create table data_01730 engine=MergeTree() order by key as select number key from numbers(1e6);
|
create table data_01730 engine=MergeTree() order by key as select number key from numbers(1e6);
|
||||||
select * from remote('127.{2..11}', currentDatabase(), data_01730) group by key order by key limit 1e6 settings distributed_group_by_no_merge=2, max_memory_usage='40Mi', optimize_aggregation_in_order=1 format Null; -- { serverError MEMORY_LIMIT_EXCEEDED }
|
select * from remote('127.{2..11}', currentDatabase(), data_01730) group by key order by key limit 1e6 settings distributed_group_by_no_merge=2, max_memory_usage='100Mi', optimize_aggregation_in_order=1 format Null;
|
||||||
select * from remote('127.{2..11}', currentDatabase(), data_01730) group by key order by key limit 1e6 settings distributed_group_by_no_merge=2, max_memory_usage='50Mi', optimize_aggregation_in_order=1 format Null;
|
|
||||||
drop table data_01730;
|
drop table data_01730;
|
||||||
|
Loading…
Reference in New Issue
Block a user