From 817c93f5d05ad0c57663d40d996fefe6df15dd40 Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Fri, 15 Nov 2019 04:04:11 +0800 Subject: [PATCH] IN (strings) perf test (#7739) --- dbms/tests/performance/string_set.xml | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 dbms/tests/performance/string_set.xml diff --git a/dbms/tests/performance/string_set.xml b/dbms/tests/performance/string_set.xml new file mode 100644 index 00000000000..54c445d3639 --- /dev/null +++ b/dbms/tests/performance/string_set.xml @@ -0,0 +1,38 @@ + + loop + + + + 10 + + + + + + + + + default.hits_10m_single + + + CREATE TABLE hits_10m_words (word String, UserID UInt64) ENGINE Memory + CREATE TABLE strings (short String, long String) ENGINE Memory + + INSERT INTO hits_10m_words SELECT DISTINCT arrayJoin(splitByString(' ', SearchPhrase)) AS word, UserID FROM hits_10m_single WHERE length(word) > 0 + INSERT INTO strings SELECT toString(rand()) a, a || a || a || a || a || a || a || a || a || a || a || a FROM numbers(1000000) + + + 1 + + + SELECT 1 FROM hits_10m_words WHERE word IN (SELECT word FROM hits_10m_words) FORMAT Null + SELECT 1 FROM strings WHERE short IN (SELECT short FROM strings) FORMAT Null + SELECT 1 FROM strings WHERE long IN (SELECT long FROM strings) FORMAT Null + SELECT 1 FROM strings WHERE short IN (SELECT long FROM strings) FORMAT Null + SELECT 1 FROM strings WHERE long IN (SELECT short FROM strings) FORMAT Null + SELECT 1 FROM hits_10m_words WHERE word IN (SELECT short FROM strings) FORMAT Null + SELECT 1 FROM hits_10m_words WHERE word IN (SELECT long FROM strings) FORMAT Null + + DROP TABLE IF EXISTS hits_10m_words + DROP TABLE IF EXISTS strings +