ClickHouse/tests/queries/0_stateless/00224_shard_distributed_aggregation_memory_efficient_and_overflows.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

15 lines
648 B
SQL

DROP TABLE IF EXISTS numbers_100k_log;
CREATE TABLE numbers_100k_log ENGINE = Log AS SELECT * FROM system.numbers LIMIT 100000;
SELECT count() = 200000 FROM remote('127.0.0.{2,3}', currentDatabase(), numbers_100k_log) GROUP BY number WITH TOTALS ORDER BY number LIMIT 10;
SET distributed_aggregation_memory_efficient = 1,
group_by_two_level_threshold = 1000,
group_by_overflow_mode = 'any',
max_rows_to_group_by = 1000,
totals_mode = 'after_having_auto';
SELECT count() = 200000 FROM remote('127.0.0.{2,3}', currentDatabase(), numbers_100k_log) GROUP BY number WITH TOTALS ORDER BY number LIMIT 10;
DROP TABLE numbers_100k_log;