loop
10
10000
50
60000
table_suffix
dd
lz4
dd_lz4
CREATE TABLE IF NOT EXISTS seq_dd (n UInt64 CODEC(DoubleDelta, NONE)) ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();
CREATE TABLE IF NOT EXISTS mon_dd AS seq_dd;
CREATE TABLE IF NOT EXISTS rnd_dd AS seq_dd;
CREATE TABLE IF NOT EXISTS seq_lz4 (n UInt64 CODEC(LZ4, NONE)) ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();
CREATE TABLE IF NOT EXISTS mon_lz4 AS seq_lz4;
CREATE TABLE IF NOT EXISTS rnd_lz4 AS seq_lz4;
CREATE TABLE IF NOT EXISTS seq_dd_lz4 (n UInt64 CODEC(DoubleDelta, LZ4, NONE)) ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();
CREATE TABLE IF NOT EXISTS mon_dd_lz4 AS seq_dd_lz4;
CREATE TABLE IF NOT EXISTS rnd_dd_lz4 AS seq_dd_lz4;
INSERT INTO seq_{table_suffix} (n) SELECT number FROM system.numbers LIMIT 100000
INSERT INTO mon_{table_suffix} (n) SELECT number*67+(rand()%67) FROM system.numbers LIMIT 100000
INSERT INTO rnd_{table_suffix} (n) SELECT rand() FROM system.numbers LIMIT 100000
INSERT INTO seq_{table_suffix} (n) SELECT n FROM seq_{table_suffix}
INSERT INTO mon_{table_suffix} (n) SELECT n FROM mon_{table_suffix}
INSERT INTO rnd_{table_suffix} (n) SELECT n FROM rnd_{table_suffix}
INSERT INTO seq_{table_suffix} (n) SELECT n FROM seq_{table_suffix}
INSERT INTO mon_{table_suffix} (n) SELECT n FROM mon_{table_suffix}
INSERT INTO rnd_{table_suffix} (n) SELECT n FROM rnd_{table_suffix}
INSERT INTO seq_{table_suffix} (n) SELECT n FROM seq_{table_suffix}
INSERT INTO mon_{table_suffix} (n) SELECT n FROM mon_{table_suffix}
INSERT INTO rnd_{table_suffix} (n) SELECT n FROM rnd_{table_suffix}
INSERT INTO seq_{table_suffix} (n) SELECT n FROM seq_{table_suffix}
INSERT INTO mon_{table_suffix} (n) SELECT n FROM mon_{table_suffix}
INSERT INTO rnd_{table_suffix} (n) SELECT n FROM rnd_{table_suffix}
INSERT INTO seq_{table_suffix} (n) SELECT number FROM system.numbers LIMIT 100000 SETTINGS max_threads=1
INSERT INTO mon_{table_suffix} (n) SELECT number*67+(rand()%67) FROM system.numbers LIMIT 100000 SETTINGS max_threads=1
INSERT INTO rnd_{table_suffix} (n) SELECT rand() FROM system.numbers LIMIT 100000 SETTINGS max_threads=1
SELECT count(n) FROM seq_{table_suffix} LIMIT 1000000 SETTINGS max_threads=1
SELECT count(n) FROM mon_{table_suffix} LIMIT 1000000 SETTINGS max_threads=1
SELECT count(n) FROM rnd_{table_suffix} LIMIT 1000000 SETTINGS max_threads=1
DROP TABLE IF EXISTS seq_{table_suffix}
DROP TABLE IF EXISTS mon_{table_suffix}
DROP TABLE IF EXISTS rnd_{table_suffix}