Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IN (strings) perf test #7739

Merged
merged 2 commits into from
Nov 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 38 additions & 0 deletions dbms/tests/performance/string_set.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<test>
<type>loop</type>

<stop_conditions>
<any_of>
<iterations>10</iterations>
</any_of>
</stop_conditions>

<main_metric>
<rows_per_second />
</main_metric>

<preconditions>
<table_exists>default.hits_10m_single</table_exists>
</preconditions>

<create_query>CREATE TABLE hits_10m_words (word String, UserID UInt64) ENGINE Memory</create_query>
<create_query>CREATE TABLE strings (short String, long String) ENGINE Memory</create_query>

<fill_query>INSERT INTO hits_10m_words SELECT DISTINCT arrayJoin(splitByString(' ', SearchPhrase)) AS word, UserID FROM hits_10m_single WHERE length(word) > 0</fill_query>
<fill_query>INSERT INTO strings SELECT toString(rand()) a, a || a || a || a || a || a || a || a || a || a || a || a FROM numbers(1000000)</fill_query>

<settings>
<max_threads>1</max_threads>
</settings>

<query>SELECT 1 FROM hits_10m_words WHERE word IN (SELECT word FROM hits_10m_words) FORMAT Null</query>
<query>SELECT 1 FROM strings WHERE short IN (SELECT short FROM strings) FORMAT Null</query>
<query>SELECT 1 FROM strings WHERE long IN (SELECT long FROM strings) FORMAT Null</query>
<query>SELECT 1 FROM strings WHERE short IN (SELECT long FROM strings) FORMAT Null</query>
<query>SELECT 1 FROM strings WHERE long IN (SELECT short FROM strings) FORMAT Null</query>
<query>SELECT 1 FROM hits_10m_words WHERE word IN (SELECT short FROM strings) FORMAT Null</query>
<query>SELECT 1 FROM hits_10m_words WHERE word IN (SELECT long FROM strings) FORMAT Null</query>

<drop_query>DROP TABLE IF EXISTS hits_10m_words</drop_query>
<drop_query>DROP TABLE IF EXISTS strings</drop_query>
</test>