mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-20 07:21:02 +00:00
15 lines
641 B
SQL
15 lines
641 B
SQL
DROP TABLE IF EXISTS partitions;
|
|
CREATE TABLE partitions (x UInt64) ENGINE = MergeTree ORDER BY x PARTITION BY x;
|
|
|
|
INSERT INTO partitions SELECT * FROM system.numbers LIMIT 100;
|
|
SELECT count() FROM system.parts WHERE database = currentDatabase() AND table = 'partitions';
|
|
INSERT INTO partitions SELECT * FROM system.numbers LIMIT 100;
|
|
SELECT count() FROM system.parts WHERE database = currentDatabase() AND table = 'partitions';
|
|
|
|
SET max_partitions_per_insert_block = 1;
|
|
|
|
INSERT INTO partitions SELECT * FROM system.numbers LIMIT 1;
|
|
INSERT INTO partitions SELECT * FROM system.numbers LIMIT 2; -- { serverError 252 }
|
|
|
|
DROP TABLE partitions;
|