2020-10-30 15:12:15 +00:00
<test >
2017-07-17 15:36:27 +00:00
2020-11-05 18:51:36 +00:00
<!-- This performance test can test various details of CPU, cache and memory performance.
Note: it is incomplete.
-->
<!-- Non - crypto hash function for strings.
SearchPhrase is notable as only 6.8% of the strings are non-empty. The average length of non-empty string is 47 bytes.
URL is non empty and quite long - the average length is 77 bytes.
PageCharset is non empty and quite short - the average length is just 6.2 bytes.
-->
2020-02-11 19:21:08 +00:00
<query > SELECT count() FROM hits_10m_single WHERE NOT ignore(cityHash64(SearchPhrase)) SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(SearchPhrase))</query>
2020-02-11 19:21:08 +00:00
<query > SELECT count() FROM hits_10m_single WHERE NOT ignore(farmHash64(SearchPhrase)) SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT count() FROM hits_100m_single WHERE NOT ignore(farmHash64(SearchPhrase))</query>
2020-02-11 19:21:08 +00:00
<query > SELECT count() FROM hits_10m_single WHERE NOT ignore(metroHash64(SearchPhrase)) SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT count() FROM hits_100m_single WHERE NOT ignore(metroHash64(SearchPhrase))</query>
2020-11-05 18:51:36 +00:00
<query > SELECT count() FROM hits_10m_single WHERE NOT ignore(cityHash64(URL)) SETTINGS max_threads = 1</query>
<query > SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(URL))</query>
<query > SELECT count() FROM hits_10m_single WHERE NOT ignore(cityHash64(PageCharset)) SETTINGS max_threads = 1</query>
<query > SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(PageCharset))</query>
<!-- A crypto hash function for strings. -->
2020-02-11 19:21:08 +00:00
<query > SELECT count() FROM hits_10m_single WHERE NOT ignore(sipHash64(SearchPhrase)) SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT count() FROM hits_100m_single WHERE NOT ignore(sipHash64(SearchPhrase))</query>
2020-03-11 20:40:26 +00:00
<query > SELECT count() FROM hits_100m_single WHERE NOT ignore(MD5(SearchPhrase))</query>
2020-02-11 19:21:08 +00:00
<query > SELECT count() FROM hits_10m_single WHERE NOT ignore(sipHash64(URL)) SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT count() FROM hits_100m_single WHERE NOT ignore(sipHash64(URL))</query>
2020-11-05 18:51:36 +00:00
<!-- Substring search. -->
2020-02-11 19:21:08 +00:00
<query > SELECT count() FROM hits_10m_single WHERE URL LIKE '%metrika%' SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT count() FROM hits_100m_single WHERE URL LIKE '%metrika%'</query>
2020-11-05 18:51:36 +00:00
<!-- Sophisticated substring search. -->
2020-02-11 19:21:08 +00:00
<query > SELECT count() FROM hits_10m_single WHERE positionCaseInsensitiveUTF8(URL, 'новости') != 0 SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT count() FROM hits_100m_single WHERE positionCaseInsensitiveUTF8(URL, 'новости') != 0</query>
2020-11-05 18:51:36 +00:00
<!-- Regexp matching. -->
2020-02-11 19:21:08 +00:00
<query > SELECT count() FROM hits_10m_single WHERE match(URL, '^https?://(?:www\\.)?metri[kc]a\\.yandex\\.(?:ru|com|com\\.tr|ua|by|kz)/.+?2014') SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT count() FROM hits_100m_single WHERE match(URL, '^https?://(?:www\\.)?metri[kc]a\\.yandex\\.(?:ru|com|com\\.tr|ua|by|kz)/.+?2014')</query>
2020-11-05 18:51:36 +00:00
<!-- Complex aggregation. -->
2020-02-13 08:56:06 +00:00
<query > SELECT SearchEngineID, SearchPhrase, RegionID FROM hits_10m_single GROUP BY SearchEngineID, SearchPhrase, RegionID ORDER BY count() DESC LIMIT 10 SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT SearchEngineID, SearchPhrase, RegionID FROM hits_100m_single GROUP BY SearchEngineID, SearchPhrase, RegionID ORDER BY count() DESC LIMIT 10</query>
2020-11-05 18:51:36 +00:00
<!-- DateTime processing function. -->
2020-02-11 19:21:08 +00:00
<query > SELECT count() FROM hits_10m_single WHERE NOT ignore(toMonday(EventTime)) SETTINGS max_threads = 1</query>
2020-11-05 18:51:36 +00:00
<!-- URL function. -->
2020-02-11 19:21:08 +00:00
<query > SELECT count() FROM hits_10m_single WHERE NOT ignore(cutQueryString(URL)) SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT count() FROM hits_100m_single WHERE NOT ignore(cutQueryString(URL))</query>
2020-11-05 18:51:36 +00:00
<!-- Various quantile estimation algorithms. -->
2020-06-23 12:09:54 +00:00
<query > SELECT quantilesIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1</query>
<query > SELECT quantilesTimingIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1</query>
<query > SELECT quantilesExactIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1</query>
<query > SELECT quantilesTDigestIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single SETTINGS max_threads = 1</query>
2020-11-05 18:51:36 +00:00
<!-- Various cardinality estimation algorithms. -->
2020-02-11 19:21:08 +00:00
<query > SELECT uniq(UserID) FROM hits_10m_single SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT uniq(UserID) FROM hits_100m_single</query>
2020-02-11 19:21:08 +00:00
<query > SELECT uniqCombined(17)(UserID) FROM hits_10m_single SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT uniqCombined(17)(UserID) FROM hits_100m_single</query>
2020-03-11 20:40:26 +00:00
<query > SELECT uniqExact(UserID) FROM hits_10m_single SETTINGS max_threads = 1</query>
2020-10-30 15:54:38 +00:00
<query > SELECT uniqExact(UserID) FROM hits_100m_single</query>
2020-11-05 18:51:36 +00:00
<!-- Something slightly more like to a real query. -->
2020-02-11 19:21:08 +00:00
<query > SELECT RegionID, uniq(UserID) FROM hits_10m_single GROUP BY RegionID SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query > SELECT RegionID, uniq(UserID) FROM hits_100m_single GROUP BY RegionID</query>
2020-11-05 18:51:36 +00:00
<!-- Read and decompress large columns. -->
2020-03-11 20:40:26 +00:00
<query > SELECT count() FROM hits_10m_single WHERE NOT ignore(Referer, URL, Title) SETTINGS max_threads = 1</query>
<query > SELECT count() FROM hits_10m_single WHERE NOT ignore(Referer, URL, Title)</query>
2017-07-17 15:36:27 +00:00
</test>