mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Add isolated performance test
This commit is contained in:
parent
48ca5d48b1
commit
bc4d96481c
42
tests/performance/sparse_column_filter.xml
Normal file
42
tests/performance/sparse_column_filter.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<test>
|
||||
<substitutions>
|
||||
<substitution>
|
||||
<name>serialization</name>
|
||||
<values>
|
||||
<value>sparse</value>
|
||||
</values>
|
||||
</substitution>
|
||||
<substitution>
|
||||
<name>ratio</name>
|
||||
<values>
|
||||
<value>10</value>
|
||||
<value>100</value>
|
||||
<value>1000</value>
|
||||
</values>
|
||||
</substitution>
|
||||
</substitutions>
|
||||
|
||||
<create_query>
|
||||
CREATE TABLE test_{serialization}_{ratio} (id UInt64, u8 UInt8, u64 UInt64, str String)
|
||||
ENGINE = MergeTree ORDER BY id
|
||||
SETTINGS ratio_of_defaults_for_sparse_serialization = 0.8
|
||||
</create_query>
|
||||
|
||||
<create_query>SYSTEM STOP MERGES test_{serialization}_{ratio}</create_query>
|
||||
|
||||
<fill_query>
|
||||
INSERT INTO test_{serialization}_{ratio} SELECT
|
||||
number,
|
||||
number % {ratio} = 0 ? rand(1) : 0,
|
||||
number % {ratio} = 0 ? rand(2) : 0,
|
||||
number % {ratio} = 0 ? randomPrintableASCII(64, 3) : ''
|
||||
FROM numbers(100000000)
|
||||
</fill_query>
|
||||
|
||||
<query>SELECT str, COUNT(DISTINCT id) as i FROM test_{serialization}_{ratio} WHERE notEmpty(str) GROUP BY str ORDER BY i DESC LIMIT 10</query>
|
||||
<query>SELECT str, COUNT(DISTINCT u8) as u FROM test_{serialization}_{ratio} WHERE notEmpty(str) GROUP BY str ORDER BY u DESC LIMIT 10</query>
|
||||
<query>SELECT str, COUNT(DISTINCT u64) as u FROM test_{serialization}_{ratio} WHERE notEmpty(str) GROUP BY str ORDER BY u DESC LIMIT 10</query>
|
||||
|
||||
|
||||
<drop_query>DROP TABLE IF EXISTS test_{serialization}_{ratio}</drop_query>
|
||||
</test>
|
Loading…
Reference in New Issue
Block a user