2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS numbers_squashed;
|
|
|
|
CREATE TABLE numbers_squashed (number UInt8) ENGINE = Memory;
|
2016-07-01 21:25:14 +00:00
|
|
|
|
|
|
|
SET min_insert_block_size_rows = 100;
|
|
|
|
SET min_insert_block_size_bytes = 0;
|
2016-07-07 05:13:08 +00:00
|
|
|
SET max_threads = 1;
|
2016-07-01 21:25:14 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO numbers_squashed
|
2016-07-01 21:25:14 +00:00
|
|
|
SELECT arrayJoin(range(10)) AS number
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(100))
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(10));
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT blockSize() AS b, count() / b AS c FROM numbers_squashed GROUP BY blockSize() ORDER BY c DESC, b ASC;
|
|
|
|
SELECT count() FROM numbers_squashed;
|
2016-07-01 21:25:14 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO numbers_squashed
|
2016-07-01 21:25:14 +00:00
|
|
|
SELECT arrayJoin(range(100)) AS number
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(10))
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(100));
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT blockSize() AS b, count() / b AS c FROM numbers_squashed GROUP BY blockSize() ORDER BY c DESC, b ASC;
|
|
|
|
SELECT count() FROM numbers_squashed;
|
2016-07-01 21:25:14 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO numbers_squashed
|
2016-07-01 21:25:14 +00:00
|
|
|
SELECT arrayJoin(range(10)) AS number
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(100))
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(100));
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT blockSize() AS b, count() / b AS c FROM numbers_squashed GROUP BY blockSize() ORDER BY c DESC, b ASC;
|
|
|
|
SELECT count() FROM numbers_squashed;
|
2016-07-01 21:25:14 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO numbers_squashed
|
2016-07-01 21:25:14 +00:00
|
|
|
SELECT arrayJoin(range(10)) AS number
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(10))
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(10))
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(100))
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(10));
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT blockSize() AS b, count() / b AS c FROM numbers_squashed GROUP BY blockSize() ORDER BY c DESC, b ASC;
|
|
|
|
SELECT count() FROM numbers_squashed;
|
2016-07-01 21:25:14 +00:00
|
|
|
|
|
|
|
SET min_insert_block_size_rows = 10;
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO numbers_squashed
|
2016-07-01 21:25:14 +00:00
|
|
|
SELECT arrayJoin(range(10)) AS number
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(10))
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(10))
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(100))
|
|
|
|
UNION ALL
|
|
|
|
SELECT arrayJoin(range(10));
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT blockSize() AS b, count() / b AS c FROM numbers_squashed GROUP BY blockSize() ORDER BY c DESC, b ASC;
|
|
|
|
SELECT count() FROM numbers_squashed;
|
2016-07-01 21:25:14 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE numbers_squashed;
|