2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS numbers_squashed;
|
|
|
|
CREATE TABLE numbers_squashed AS system.numbers ENGINE = StripeLog;
|
2016-07-01 21:13:58 +00:00
|
|
|
|
|
|
|
SET max_block_size = 10000;
|
|
|
|
|
|
|
|
SET min_insert_block_size_rows = 1000000;
|
|
|
|
SET min_insert_block_size_bytes = 0;
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO numbers_squashed SELECT * FROM system.numbers LIMIT 10000000;
|
|
|
|
SELECT blockSize() AS b, count() / b AS c FROM numbers_squashed GROUP BY blockSize() ORDER BY c DESC;
|
2016-07-01 21:13:58 +00:00
|
|
|
|
|
|
|
SET min_insert_block_size_bytes = 1000000;
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO numbers_squashed SELECT * FROM system.numbers LIMIT 10000000;
|
|
|
|
SELECT blockSize() AS b, count() / b AS c FROM numbers_squashed GROUP BY blockSize() ORDER BY c DESC;
|
2016-07-01 21:13:58 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT count() FROM numbers_squashed;
|
2016-07-01 21:13:58 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE numbers_squashed;
|