ClickHouse/tests/queries/0_stateless/00989_parallel_parts_loading.sql
Nikita Mikhaylov e87348010d
Rework loading and removing of data parts for MergeTree tables. (#49474)
Co-authored-by: Sergei Trifonov <sergei@clickhouse.com>
2023-06-06 14:42:56 +02:00

22 lines
505 B
SQL

-- Tags: no-parallel
DROP TABLE IF EXISTS mt;
CREATE TABLE mt (x UInt64) ENGINE = MergeTree ORDER BY x SETTINGS parts_to_delay_insert = 100000, parts_to_throw_insert = 100000;
SYSTEM STOP MERGES mt;
SET max_block_size = 1, min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0;
INSERT INTO mt SELECT * FROM numbers(1000);
SET max_block_size = 65536;
SELECT count(), sum(x) FROM mt;
DETACH TABLE mt;
ATTACH TABLE mt;
SELECT count(), sum(x) FROM mt;
SYSTEM START MERGES mt;
DROP TABLE mt;