Files
datastore/tests/performance/text_index_partially_materialized.xml

28 lines
1.9 KiB
XML

<test>
<settings>
<use_skip_indexes_on_data_read>1</use_skip_indexes_on_data_read>
<query_plan_direct_read_from_text_index>1</query_plan_direct_read_from_text_index>
</settings>
<create_query>CREATE TABLE text_index_partially_materialized (text String) ENGINE = MergeTree ORDER BY tuple()</create_query>
<fill_query>INSERT INTO text_index_partially_materialized SELECT arrayStringConcat(arrayMap(x -> toString(rand(number * 30 + x) % 500000), range(42)), ' ') FROM numbers(1000)</fill_query>
<fill_query>ALTER TABLE text_index_partially_materialized ADD INDEX idx(text) TYPE text(tokenizer = splitByNonAlpha)</fill_query>
<fill_query>INSERT INTO text_index_partially_materialized SELECT arrayStringConcat(arrayMap(x -> toString(rand(number * 30 + x) % 500000), range(42)), ' ') FROM numbers(1000000)</fill_query>
<fill_query>SYSTEM STOP MERGES text_index_partially_materialized</fill_query>
<query>SELECT count() FROM text_index_partially_materialized WHERE hasToken(text, '143565')</query>
<query>SELECT count() FROM text_index_partially_materialized WHERE hasToken(text, '394041')</query>
<query>SELECT count() FROM text_index_partially_materialized WHERE hasToken(text, '285614')</query>
<query>SELECT count() FROM text_index_partially_materialized WHERE hasAnyTokens(text, ['143565'])</query>
<query>SELECT count() FROM text_index_partially_materialized WHERE hasAnyTokens(text, ['394041'])</query>
<query>SELECT count() FROM text_index_partially_materialized WHERE hasAnyTokens(text, ['285614'])</query>
<query>SELECT count() FROM text_index_partially_materialized WHERE hasAllTokens(text, ['143565'])</query>
<query>SELECT count() FROM text_index_partially_materialized WHERE hasAllTokens(text, ['394041'])</query>
<query>SELECT count() FROM text_index_partially_materialized WHERE hasAllTokens(text, ['285614'])</query>
<drop_query>DROP TABLE IF EXISTS text_index_partially_materialized</drop_query>
</test>