ClickHouse/tests/queries/0_stateless/00988_parallel_parts_removal.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
592 B
MySQL
Raw Normal View History

2019-08-11 19:14:42 +00:00
DROP TABLE IF EXISTS mt;
CREATE TABLE mt (x UInt64) ENGINE = MergeTree ORDER BY x SETTINGS max_part_removal_threads = 16, cleanup_delay_period = 1, cleanup_delay_period_random_add = 0, old_parts_lifetime = 1, parts_to_delay_insert = 100000, parts_to_throw_insert = 100000;
2020-07-15 11:47:51 +00:00
SYSTEM STOP MERGES mt;
2019-08-11 19:14:42 +00:00
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;
2020-07-15 11:47:51 +00:00
SYSTEM START MERGES mt;
2019-08-11 19:14:42 +00:00
OPTIMIZE TABLE mt FINAL;
SELECT count(), sum(x) FROM mt;
DROP TABLE mt;