add perf test

This commit is contained in:
Anton Popov 2021-10-16 16:41:54 +03:00
parent c928ce8369
commit 1a947d30bf

View File

@ -15,17 +15,25 @@
<value>1000</value>
</values>
</substitution>
<substitution>
<name>uniqs</name>
<values>
<value>100</value>
<value>10000</value>
<value>1000000</value>
</values>
</substitution>
</substitutions>
<create_query>CREATE TABLE mt_{parts}_parts(id UInt32, val1 UInt32, val2 UInt32) ENGINE = MergeTree ORDER BY val1 PARTITION BY id % {parts} SETTINGS parts_to_throw_insert=10000, parts_to_delay_insert=10000</create_query>
<fill_query>SYSTEM STOP MERGES mt_{parts}_parts</fill_query>
<fill_query>INSERT INTO mt_{parts}_parts SELECT number, rand() % 10000, rand() FROM numbers_mt(100000000) SETTINGS max_block_size=10000000</fill_query>
<fill_query>SYSTEM START MERGES mt_{parts}_parts</fill_query>
<fill_query>OPTIMIZE TABLE mt_{parts}_parts FINAL</fill_query>
<create_query>CREATE TABLE mt_{parts}_parts_{uniqs}_uniqs(id UInt32, val1 UInt32, val2 UInt32) ENGINE = MergeTree ORDER BY val1 PARTITION BY id % {parts} SETTINGS parts_to_throw_insert=10000, parts_to_delay_insert=10000</create_query>
<fill_query>SYSTEM STOP MERGES mt_{parts}_parts_{uniqs}_uniqs</fill_query>
<fill_query>INSERT INTO mt_{parts}_parts_{uniqs}_uniqs SELECT number, rand() % {uniqs}, rand() FROM numbers_mt(100000000) SETTINGS max_block_size=10000000</fill_query>
<fill_query>SYSTEM START MERGES mt_{parts}_parts_{uniqs}_uniqs</fill_query>
<fill_query>OPTIMIZE TABLE mt_{parts}_parts_{uniqs}_uniqs FINAL</fill_query>
<query>SELECT val2 FROM mt_{parts}_parts ORDER BY val1 LIMIT 1000000 FORMAT Null</query>
<query>SELECT val2 FROM mt_{parts}_parts ORDER BY val1 LIMIT 10000000 FORMAT Null</query>
<query>SELECT sum(val2) FROM mt_{parts}_parts GROUP BY val1 FORMAT Null</query>
<query>SELECT val2 FROM mt_{parts}_parts_10000_uniqs ORDER BY val1 LIMIT 1000000 FORMAT Null</query>
<query>SELECT val2 FROM mt_{parts}_parts_10000_uniqs ORDER BY val1 LIMIT 10000000 FORMAT Null</query>
<query>SELECT sum(val2) FROM mt_{parts}_parts_{uniqs}_uniqs GROUP BY val1 FORMAT Null</query>
<drop_query>DROP TABLE IF EXISTS mt_{parts}_parts</drop_query>
<drop_query>DROP TABLE IF EXISTS mt_{parts}_parts_{uniqs}_uniqs</drop_query>
</test>