2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS sites;
|
|
|
|
CREATE TABLE sites (Domain UInt8, `Users.UserID` Array(UInt64), `Users.Dates` Array(Array(Date))) ENGINE = MergeTree ORDER BY Domain SETTINGS vertical_merge_algorithm_min_rows_to_activate = 0, vertical_merge_algorithm_min_columns_to_activate = 0;
|
2018-10-16 20:48:13 +00:00
|
|
|
|
2020-07-15 11:47:51 +00:00
|
|
|
SYSTEM STOP MERGES sites;
|
2018-10-16 20:48:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO sites VALUES (1,[1],[[]]);
|
|
|
|
INSERT INTO sites VALUES (2,[1],[['2018-06-22']]);
|
2018-10-16 20:48:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT count(), countArray(Users.Dates), countArrayArray(Users.Dates) FROM sites;
|
2020-07-15 11:47:51 +00:00
|
|
|
SYSTEM START MERGES sites;
|
2019-04-16 14:13:13 +00:00
|
|
|
OPTIMIZE TABLE sites FINAL;
|
|
|
|
SELECT count(), countArray(Users.Dates), countArrayArray(Users.Dates) FROM sites;
|
2018-10-16 20:48:13 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE sites;
|