ClickHouse/tests/queries/0_stateless/00625_summing_merge_tree_merge.sql

32 lines
498 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS tab_00625;
CREATE TABLE tab_00625
(
2019-06-07 14:26:29 +00:00
date Date,
key UInt32,
testMap Nested(
2019-06-07 14:26:29 +00:00
k UInt16,
v UInt64)
)
ENGINE = SummingMergeTree(date, (date, key), 1);
2019-06-07 14:26:29 +00:00
INSERT INTO tab_00625 SELECT
today(),
number,
[toUInt16(number)],
[number]
2019-06-07 14:26:29 +00:00
FROM system.numbers
LIMIT 8190;
2019-06-07 14:26:29 +00:00
INSERT INTO tab_00625 SELECT
today(),
number + 8190,
[toUInt16(number)],
[number + 8190]
2019-06-07 14:26:29 +00:00
FROM system.numbers
LIMIT 10;
OPTIMIZE TABLE tab_00625;
2019-06-07 14:26:29 +00:00
DROP TABLE tab_00625;