Fix perf tests

This commit is contained in:
Alexey Milovidov 2020-11-08 16:55:26 +03:00
parent 0d588e4458
commit f4178dd91f
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,10 @@
<test>
<create_query>DROP TABLE IF EXISTS test_bf</create_query>
<create_query>CREATE TABLE test_bf (`id` int, `ary` Array(String), INDEX idx_ary ary TYPE bloom_filter(0.01) GRANULARITY 8192) ENGINE = MergeTree() ORDER BY id</create_query>
<create_query>SYSTEM STOP MERGES</create_query>
<query>INSERT INTO test_bf SELECT number AS id, [CAST(id, 'String'), CAST(id + 1, 'String'), CAST(id + 2, 'String')] FROM numbers(1000000)</query>
<drop_query>SYSTEM START MERGES</drop_query>
<drop_query>DROP TABLE IF EXISTS test_bf</drop_query>
</test>

View File

@ -0,0 +1,11 @@
<test>
<create_query>DROP TABLE IF EXISTS test_bf</create_query>
<create_query>CREATE TABLE test_bf_indexOf (`id` int, `ary` Array(LowCardinality(Nullable(String))), INDEX idx_ary ary TYPE bloom_filter(0.01) GRANULARITY 1) ENGINE = MergeTree() ORDER BY id</create_query>
<fill_query>INSERT INTO test_bf_indexOf SELECT number AS id, [CAST(id, 'String'), CAST(id + 1, 'String'), CAST(id + 2, 'String')] FROM numbers(1000000)</fill_query>
<query>SELECT count() FROM test_bf_indexOf WHERE indexOf(ary, '1') = 2</query>
<query>SELECT count() FROM test_bf_indexOf WHERE indexOf(ary, '1') > 0</query>
<drop_query>DROP TABLE IF EXISTS test_bf_indexOf</drop_query>
</test>