ClickHouse/tests/performance/read_in_order_many_parts.xml
2020-10-30 18:12:15 +03:00

29 lines
1.2 KiB
XML

<test>
<settings>
<optimize_aggregation_in_order>1</optimize_aggregation_in_order>
<optimize_read_in_order>1</optimize_read_in_order>
<max_partitions_per_insert_block>2000</max_partitions_per_insert_block>
<max_threads>8</max_threads>
</settings>
<substitutions>
<substitution>
<name>parts</name>
<values>
<value>100</value>
<value>1000</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}</create_query>
<fill_query>INSERT INTO mt_{parts}_parts SELECT number, rand() % 10000, rand() FROM numbers_mt(100000000)</fill_query>
<fill_query>OPTIMIZE TABLE mt_{parts}_parts 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>
<drop_query>DROP TABLE IF EXISTS mt_{parts}_parts</drop_query>
</test>