2019-04-18 18:48:04 +00:00
|
|
|
DROP TABLE IF EXISTS tab_00625;
|
2018-05-14 10:48:50 +00:00
|
|
|
|
2019-04-18 18:48:04 +00:00
|
|
|
CREATE TABLE tab_00625
|
2018-05-14 10:48:50 +00:00
|
|
|
(
|
2019-06-07 14:26:29 +00:00
|
|
|
date Date,
|
|
|
|
key UInt32,
|
2018-05-14 10:48:50 +00:00
|
|
|
testMap Nested(
|
2019-06-07 14:26:29 +00:00
|
|
|
k UInt16,
|
2018-05-14 10:48:50 +00:00
|
|
|
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)],
|
2018-05-14 10:48:50 +00:00
|
|
|
[number]
|
2019-06-07 14:26:29 +00:00
|
|
|
FROM system.numbers
|
2018-05-14 10:48:50 +00:00
|
|
|
LIMIT 8190;
|
|
|
|
|
2019-06-07 14:26:29 +00:00
|
|
|
INSERT INTO tab_00625 SELECT
|
|
|
|
today(),
|
|
|
|
number + 8190,
|
|
|
|
[toUInt16(number)],
|
2018-05-14 10:48:50 +00:00
|
|
|
[number + 8190]
|
2019-06-07 14:26:29 +00:00
|
|
|
FROM system.numbers
|
2018-05-14 10:48:50 +00:00
|
|
|
LIMIT 10;
|
|
|
|
|
2019-04-18 18:48:04 +00:00
|
|
|
OPTIMIZE TABLE tab_00625;
|
2019-06-07 14:26:29 +00:00
|
|
|
|
|
|
|
DROP TABLE tab_00625;
|