IPv4 Functions
once
1000
2000
table_suffix
g
lz4
g_lz4
CREATE TABLE IF NOT EXISTS seq_g (n UInt64 CODEC(Gorilla, NONE)) ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();
CREATE TABLE IF NOT EXISTS mon_g AS seq_g;
CREATE TABLE IF NOT EXISTS rnd_g AS seq_g;
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_g_lz4 (n UInt64 CODEC(Gorilla, LZ4, NONE)) ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();
CREATE TABLE IF NOT EXISTS mon_g_lz4 AS seq_g_lz4;
CREATE TABLE IF NOT EXISTS rnd_g_lz4 AS seq_g_lz4;
INSERT INTO seq_{table_suffix} (n) SELECT number/pi() FROM system.numbers LIMIT 100000
INSERT INTO mon_{table_suffix} (n) SELECT number+sin(number) FROM system.numbers LIMIT 100000
INSERT INTO rnd_{table_suffix} (n) SELECT (rand() - 4294967295)/pi() 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/pi() FROM system.numbers SETTINGS max_threads=1
INSERT INTO mon_{table_suffix} (n) SELECT number+sin(number) FROM system.numbers SETTINGS max_threads=1
INSERT INTO rnd_{table_suffix} (n) SELECT (rand() - 4294967295)/pi() FROM system.numbers SETTINGS max_threads=1
SELECT count(n) FROM seq_{table_suffix} SETTINGS max_threads=1
SELECT count(n) FROM mon_{table_suffix} SETTINGS max_threads=1
SELECT count(n) FROM rnd_{table_suffix} 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}