ClickHouse/dbms/tests/performance/cpu_synthetic.xml

96 lines
7.6 KiB
XML
Raw Normal View History

2017-07-17 15:36:27 +00:00
<test>
2017-07-17 18:01:47 +00:00
2017-07-17 15:36:27 +00:00
<stop_conditions>
2017-07-17 18:01:47 +00:00
<all_of>
<iterations>3</iterations>
2017-07-17 18:01:47 +00:00
<min_time_not_changing_for_ms>10000</min_time_not_changing_for_ms>
</all_of>
2017-07-17 15:36:27 +00:00
<any_of>
<iterations>5</iterations>
2017-07-17 18:01:47 +00:00
<total_time_ms>60000</total_time_ms>
2017-07-17 15:36:27 +00:00
</any_of>
</stop_conditions>
2017-07-17 18:01:47 +00:00
2017-07-17 15:36:27 +00:00
<preconditions>
2020-02-10 18:38:28 +00:00
<table_exists>hits_100m_single</table_exists>
2020-02-11 19:21:08 +00:00
<table_exists>hits_10m_single</table_exists>
2017-07-17 15:36:27 +00:00
</preconditions>
2017-07-17 18:01:47 +00:00
<!-- 14. Некриптографическая хэш-функция для строк небольшой длины.
2017-07-17 15:36:27 +00:00
В качестве данных в следующих тестах будут использованы поисковые фразы (SearchPhrase), URL и PageCharset.
Строка SearchPhrase непустая только в 6.8% случаев. Средняя длина непустой строки - 47 байт.
URL почти всегда непуст и его средняя длина - 77 байт.
PageCharset тоже почти всегда непуст, но его средняя длина поменьше - 6.2 байта. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 15. Некриптографическая хэш-функция для строк небольшой длины. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 16. Некриптографическая хэш-функция для строк небольшой длины. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 17. Криптографическая хэш-функция для строк. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 18. Криптографическая хэш-функция для строк. -->
2020-03-11 20:40:26 +00:00
<query>SELECT count() FROM hits_10m_single WHERE NOT ignore(MD5(SearchPhrase)) SETTINGS max_threads = 1</query>
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(MD5(SearchPhrase))</query>
2017-07-17 15:36:27 +00:00
<!-- 19. Криптографическая хэш-функция для строк. -->
2020-03-11 20:40:26 +00:00
<!-- MD5 was too slow, removed. -->
2017-07-17 15:36:27 +00:00
<!-- 20. -->
2020-02-11 19:21:08 +00:00
<query>SELECT count() FROM hits_10m_single WHERE NOT ignore(cityHash64(URL)) SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(URL))</query>
2017-07-17 15:36:27 +00:00
<!-- 21. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 22. -->
2020-02-11 19:21:08 +00:00
<query>SELECT count() FROM hits_10m_single WHERE NOT ignore(cityHash64(PageCharset)) SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(cityHash64(PageCharset))</query>
2017-07-17 15:36:27 +00:00
<!-- 23. Поиск подстроки в строке. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 24. Более сложный поиск подстроки в строке. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 25. Регексп. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 34. Сложная агрегация. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 36. Функция для работы с датой и временем. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 37. Функция для работы с URL. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 38. Разные алгоритмы вычисления квантилей. -->
2020-02-11 19:21:08 +00:00
<query>SELECT quantilesIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_10m_single SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query>SELECT quantilesIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single</query>
2017-07-17 15:36:27 +00:00
<!-- 39. Разные алгоритмы вычисления квантилей. -->
2020-02-11 19:21:08 +00:00
<query>SELECT quantilesTimingIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_10m_single SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query>SELECT quantilesTimingIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single</query>
2017-07-17 15:36:27 +00:00
<!-- 40. Разные алгоритмы вычисления квантилей. -->
2020-02-11 19:21:08 +00:00
<query>SELECT quantilesExactIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_10m_single SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query>SELECT quantilesExactIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single</query>
2017-07-17 15:36:27 +00:00
<!-- 41. Разные алгоритмы вычисления квантилей. -->
2020-02-11 19:21:08 +00:00
<query>SELECT quantilesTDigestIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_10m_single SETTINGS max_threads = 1</query>
2020-02-10 18:38:28 +00:00
<query>SELECT quantilesTDigestIf(0.5, 0.9)(SendTiming, SendTiming > 0) FROM hits_100m_single</query>
2017-07-17 15:36:27 +00:00
<!-- 42. Разные алгоритмы вычисления кардинальности. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 43. Разные алгоритмы вычисления кардинальности. -->
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>
2017-07-17 15:36:27 +00:00
<!-- 44. Разные алгоритмы вычисления кардинальности. -->
2020-03-11 20:40:26 +00:00
<query>SELECT uniqExact(UserID) FROM hits_10m_single SETTINGS max_threads = 1</query>
2020-03-11 15:10:29 +00:00
<query>SELECT uniqExact(UserID) FROM hits_10m_single</query>
2017-07-17 15:36:27 +00:00
<!-- 45. Что-то чуть более похожее на реальный запрос. -->
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-03-11 20:40:26 +00:00
<!-- 47. Читаем и разжимаем крупные столбцы, и ничего с ними потом не делаем. -->
<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>