ClickHouse/tests/performance/codecs_int_select.xml
2020-04-18 15:54:16 +03:00

50 lines
1.8 KiB
XML

<test>
<substitutions>
<substitution>
<name>codec</name>
<values>
<value>NONE</value> <!-- as a baseline -->
<value>LZ4</value>
<value>ZSTD</value>
<value>Delta</value>
<value>T64</value>
<value>DoubleDelta</value>
<value>Gorilla</value>
</values>
</substitution>
<substitution>
<name>type</name>
<values>
<value>UInt64</value>
</values>
</substitution>
<substitution>
<name>seq_type</name>
<values>
<value>seq</value>
<value>mon</value>
<value>rnd</value>
</values>
</substitution>
<substitution>
<name>num_rows</name>
<values>
<value>1000000</value>
</values>
</substitution>
</substitutions>
<create_query>CREATE TABLE IF NOT EXISTS codec_{seq_type}_{type}_{codec} (n {type} CODEC({codec})) ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();</create_query>
<fill_query>INSERT INTO codec_seq_{type}_{codec} (n) SELECT number FROM system.numbers LIMIT {num_rows} SETTINGS max_threads=1</fill_query>
<fill_query>INSERT INTO codec_mon_{type}_{codec} (n) SELECT number*512+(intHash64(number)%512) FROM system.numbers LIMIT {num_rows} SETTINGS max_threads=1</fill_query>
<fill_query>INSERT INTO codec_rnd_{type}_{codec} (n) SELECT intHash64(number) FROM system.numbers LIMIT {num_rows} SETTINGS max_threads=1</fill_query>
<query>SELECT count(n) FROM codec_{seq_type}_{type}_{codec} WHERE ignore(n) == 0 LIMIT {num_rows} SETTINGS max_threads=1</query>
<drop_query>DROP TABLE IF EXISTS codec_{seq_type}_{type}_{codec}</drop_query>
</test>