mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Remove "preconditions" from performance tests (overengineering, unneeded feature)
This commit is contained in:
parent
66f62b2ba6
commit
88826e2da5
@ -256,20 +256,6 @@ for conn_index, c in enumerate(all_connections):
|
||||
|
||||
reportStageEnd("settings")
|
||||
|
||||
# Check tables that should exist. If they don't exist, just skip this test.
|
||||
tables = [e.text for e in root.findall("preconditions/table_exists")]
|
||||
for t in tables:
|
||||
for c in all_connections:
|
||||
try:
|
||||
res = c.execute("select 1 from {} limit 1".format(t))
|
||||
except:
|
||||
exception_message = traceback.format_exception_only(*sys.exc_info()[:2])[-1]
|
||||
skipped_message = " ".join(exception_message.split("\n")[:2])
|
||||
print(f"skipped\t{tsv_escape(skipped_message)}")
|
||||
sys.exit(0)
|
||||
|
||||
reportStageEnd("preconditions")
|
||||
|
||||
if not args.use_existing_tables:
|
||||
# Run create and fill queries. We will run them simultaneously for both
|
||||
# servers, to save time. The weird XML search + filter is because we want to
|
||||
|
@ -83,7 +83,7 @@ $ ./src/unit_tests_dbms --gtest_filter=LocalAddress*
|
||||
|
||||
Performance tests allow to measure and compare performance of some isolated part of ClickHouse on synthetic queries. Tests are located at `tests/performance`. Each test is represented by `.xml` file with description of test case. Tests are run with `docker/tests/performance-comparison` tool . See the readme file for invocation.
|
||||
|
||||
Each test run one or multiple queries (possibly with combinations of parameters) in a loop. Some tests can contain preconditions on preloaded test dataset.
|
||||
Each test run one or multiple queries (possibly with combinations of parameters) in a loop.
|
||||
|
||||
If you want to improve performance of ClickHouse in some scenario, and if improvements can be observed on simple queries, it is highly recommended to write a performance test. It always makes sense to use `perf top` or other perf tools during your tests.
|
||||
|
||||
|
@ -6,12 +6,8 @@ This directory contains `.xml`-files with performance tests for @akuzm tool.
|
||||
|
||||
First of all you should check existing tests don't cover your case. If there are no such tests than you should write your own.
|
||||
|
||||
You have to specify `preconditions`. It contains table names. Only `hits_100m_single`, `hits_10m_single`, `test.hits` are available in CI.
|
||||
|
||||
You can use `substitions`, `create`, `fill` and `drop` queries to prepare test. You can find examples in this folder.
|
||||
|
||||
Take into account, that these tests will run in CI which consists of 56-cores and 512 RAM machines. Queries will be executed much faster than on local laptop.
|
||||
|
||||
If your test continued more than 10 minutes, please, add tag `long` to have an opportunity to run all tests and skip long ones.
|
||||
|
||||
### How to run performance test
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<substitutions>
|
||||
<substitution>
|
||||
<name>group_scale</name>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT min(length(URL)), max(length(URL)) FROM hits_10m_single GROUP BY length(URL) FORMAT Null</query>
|
||||
<query>SELECT any(WatchID), anyLast(WatchID) FROM hits_10m_single GROUP BY WatchID FORMAT Null</query>
|
||||
</test>
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<settings><optimize_aggregation_in_order>1</optimize_aggregation_in_order></settings>
|
||||
|
||||
<substitutions>
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>
|
||||
SELECT *
|
||||
FROM
|
||||
@ -46,5 +41,4 @@
|
||||
ON (visits.fingerprint = origins.fingerprint AND visits.date >= origins.date)
|
||||
FORMAT Null
|
||||
</query>
|
||||
|
||||
</test>
|
||||
|
@ -5,10 +5,6 @@
|
||||
<max_insert_threads>8</max_insert_threads>
|
||||
</settings>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<create_query>CREATE TABLE perf_avg(
|
||||
num UInt64,
|
||||
num_u Decimal256(75) MATERIALIZED toDecimal256(num / 400000, 75),
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<settings>
|
||||
<max_threads>1</max_threads>
|
||||
</settings>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<settings>
|
||||
<max_threads>1</max_threads>
|
||||
</settings>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<settings>
|
||||
<max_threads>1</max_threads>
|
||||
</settings>
|
||||
|
@ -1,7 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
<settings>
|
||||
<max_threads>1</max_threads>
|
||||
</settings>
|
||||
|
@ -3,10 +3,6 @@
|
||||
<allow_experimental_nlp_functions>1</allow_experimental_nlp_functions>
|
||||
</settings>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT detectLanguage(SearchPhrase) FROM hits_100m_single LIMIT 10000000 FORMAT Null</query>
|
||||
<query>SELECT detectLanguageMixed(SearchPhrase) FROM hits_100m_single LIMIT 10000000 FORMAT Null</query>
|
||||
<query>SELECT detectTonality(SearchPhrase) FROM hits_100m_single FORMAT Null</query>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<create_query>CREATE TABLE hits_none (Title String CODEC(NONE)) ENGINE = MergeTree ORDER BY tuple()</create_query>
|
||||
<fill_query>INSERT INTO hits_none SELECT Title FROM test.hits</fill_query>
|
||||
<fill_query>OPTIMIZE TABLE hits_none FINAL</fill_query>
|
||||
|
@ -1,11 +1,4 @@
|
||||
<test>
|
||||
|
||||
|
||||
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT Title FROM test.hits ORDER BY Title DESC LIMIT 1000, 10</query>
|
||||
<query>SELECT Title FROM test.hits ORDER BY Title DESC COLLATE 'tr' LIMIT 1000, 10</query>
|
||||
</test>
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>select sum(UserID + 1 in (select UserID from hits_10m_single)) from hits_10m_single</query>
|
||||
<query>select sum((UserID + 1, RegionID) in (select UserID, RegionID from hits_10m_single)) from hits_10m_single</query>
|
||||
<query>select sum(URL in (select URL from hits_10m_single where URL != '')) from hits_10m_single</query>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(concat(URL, URL))</query>
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(concat(URL, SearchPhrase))</query>
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(concat(MobilePhoneModel, SearchPhrase))</query>
|
||||
|
@ -3,12 +3,6 @@
|
||||
<tag>comparison</tag>
|
||||
</tags>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
|
||||
|
||||
<query><![CDATA[SELECT count() FROM hits_100m_single WHERE URL < '']]></query>
|
||||
<query><![CDATA[SELECT count() FROM hits_100m_single WHERE URL < 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz']]></query>
|
||||
<query><![CDATA[SELECT count() FROM hits_100m_single WHERE URL < 'http://some_url']]></query>
|
||||
@ -30,5 +24,4 @@
|
||||
<query><![CDATA[SELECT count() FROM hits_100m_single WHERE Title < '']]></query>
|
||||
<query><![CDATA[SELECT count() FROM hits_100m_single WHERE Title < 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz']]></query>
|
||||
<query><![CDATA[SELECT count() FROM hits_100m_single WHERE Title < 'Какой-то заголовок']]></query>
|
||||
|
||||
</test>
|
||||
|
@ -3,11 +3,6 @@
|
||||
<tag>search</tag>
|
||||
</tags>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query><![CDATA[SELECT count() FROM hits_100m_single WHERE match(URL, ' *tranio\\.ru/spain/*/commercial/*') settings max_threads=5]]></query>
|
||||
|
||||
<query><![CDATA[select countIf(position(URL, 'yandex') > 0), count(position(URL, 'google')) FROM hits_100m_single]]></query>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT count() FROM test.hits WHERE NOT ignore(countMatches(URL, 'yandex'))</query>
|
||||
<query>SELECT count() FROM test.hits WHERE NOT ignore(countMatches(URL, 'yandex|google'))</query>
|
||||
<query>SELECT count() FROM test.hits WHERE NOT ignore(countMatches(URL, '(\\w+=\\w+)'))</query>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<!-- This performance test can test various details of CPU, cache and memory performance.
|
||||
Note: it is incomplete.
|
||||
|
@ -1,7 +1,3 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(toDate(toString(EventDate)))</query>
|
||||
</test>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<settings>
|
||||
<max_threads>1</max_threads>
|
||||
</settings>
|
||||
|
@ -1,7 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
<settings><max_threads>1</max_threads></settings>
|
||||
|
||||
<!-- FIXME this should have been an EXPLAIN test, no point in measuring performance to deduce that the query was rewritten -->
|
||||
|
@ -1,7 +1,3 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT count() FROM hits_10m_single WHERE NOT ignore(encodeXMLComponent(URL))</query>
|
||||
</test>
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT entropy(SearchEngineID) FROM hits_100m_single settings max_threads = 1</query>
|
||||
<query>SELECT entropy(SearchPhrase) FROM hits_10m_single</query>
|
||||
<query>SELECT entropy(MobilePhoneModel) FROM hits_100m_single</query>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT count() FROM test.hits WHERE NOT ignore(extract(URL, '(\\w+=\\w+)'))</query>
|
||||
<query>SELECT count() FROM test.hits WHERE NOT ignore(extractAll(URL, '(\\w+=\\w+)'))</query>
|
||||
<query>SELECT count() FROM test.hits WHERE NOT ignore(extractGroups(URL, '(\\w+)=(\\w+)'))</query>
|
||||
|
@ -3,10 +3,6 @@
|
||||
<tag>comparison</tag>
|
||||
</tags>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<settings><max_threads>1</max_threads></settings>
|
||||
|
||||
<query><![CDATA[SELECT count() FROM test.hits WHERE ClientIP6 < RemoteIP6]]></query>
|
||||
|
@ -3,10 +3,6 @@
|
||||
<max_size_to_preallocate_for_aggregation>1000000000</max_size_to_preallocate_for_aggregation>
|
||||
</settings>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<substitutions>
|
||||
<substitution>
|
||||
<name>table_name</name>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(rand() % 2 ? URL : Referer)</query>
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(rand() % 2 ? URL : '')</query>
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(rand() % 2 ? SearchPhrase : MobilePhoneModel)</query>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT length(URL) > 1000 ? 'LONG' : 'SHORT' as x FROM hits_100m_single GROUP BY x FORMAT Null</query>
|
||||
<query>SELECT transform(number, [2, 4, 6], ['google', 'yandex', 'yahoo'], 'other') as x FROM numbers(100000000) GROUP BY x FORMAT Null</query>
|
||||
|
||||
|
@ -1,11 +1,4 @@
|
||||
<test>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
|
||||
|
||||
<query>SELECT categoricalInformationValue(Age < 15, IsMobile) from hits_100m_single</query>
|
||||
<query>SELECT categoricalInformationValue(Age < 15, Age >= 15 and Age < 30, Age >= 30 and Age < 45, Age >= 45 and Age < 60, Age >= 60, IsMobile) from hits_100m_single</query>
|
||||
</test>
|
||||
|
@ -11,13 +11,6 @@
|
||||
SELECT DOMInteractiveTiming, NSToDOMContentLoadedTiming, RefererCategories, URLCategories, arrayMap(x -> x * 0.5, RefererRegions) AS arf from test.hits LIMIT 10000 INTO OUTFILE '/path/to/data/user_files/test_some_expr_matches.values' FORMAT Template SETTINGS format_schema_rows = '(${DOMInteractiveTiming:Quoted} * ${NSToDOMContentLoadedTiming:Quoted}, arraySort(arrayConcat(${RefererCategories:Quoted}, ${URLCategories:Quoted})), arrayMap(x -> toString(x), ${arf:Quoted}))', format_schema_rows_between_delimiter = ',\n'
|
||||
-->
|
||||
|
||||
|
||||
<preconditions>
|
||||
<table_exists>file('test_all_expr_matches.values', Values, 'd DateTime, i UInt32, s String, ni Nullable(UInt64), ns Nullable(String), ars Array(String)')</table_exists>
|
||||
<table_exists>file('test_some_expr_matches.values', Values, 'i Int64, ari Array(Int64), ars Array(String)')</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>select * from file('test_all_expr_matches.values', Values, 'd DateTime, i UInt32, s String, ni Nullable(UInt64), ns Nullable(String), ars Array(String)') format Null</query>
|
||||
<query>select * from file('test_some_expr_matches.values', Values, 'i Int64, ari Array(Int64), ars Array(String)') format Null</query>
|
||||
|
||||
</test>
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT count() FROM hits_10m_single WHERE NOT ignore(toString(WatchID)) SETTINGS max_threads = 1</query>
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(toString(JavaEnable)) SETTINGS max_threads = 1</query>
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(toString(GoodEvent)) SETTINGS max_threads = 1</query>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<settings>
|
||||
<compile_aggregate_expressions>1</compile_aggregate_expressions>
|
||||
<min_count_to_compile_aggregate_expression>0</min_count_to_compile_aggregate_expression>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(least(URL, Referer))</query>
|
||||
<query>SELECT count() FROM hits_10m_single WHERE NOT ignore(greatest(URL, Referer, Title))</query>
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(greatest(ClientIP, RemoteIP))</query>
|
||||
|
@ -1,7 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
<settings><max_threads>1</max_threads></settings>
|
||||
|
||||
<query><![CDATA[SELECT max(length(MobilePhoneModel)) FROM hits_100m_single]]></query>
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<create_query>DROP TABLE IF EXISTS test_model</create_query>
|
||||
<create_query>CREATE TABLE test_model engine = Memory as select stochasticLinearRegressionState(0.0001)(Age, Income, ParamPrice, Robotness, RefererHash) as state from test.hits</create_query>
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<create_query>
|
||||
CREATE MATERIALIZED VIEW hits_mv ENGINE MergeTree
|
||||
PARTITION BY toYYYYMM(EventDate)
|
||||
|
@ -1,11 +1,4 @@
|
||||
<test>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
|
||||
|
||||
<settings>
|
||||
<max_threads>5</max_threads>
|
||||
</settings>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<settings>
|
||||
<local_filesystem_read_method>mmap</local_filesystem_read_method>
|
||||
<min_bytes_to_use_mmap_io>1</min_bytes_to_use_mmap_io>
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT * FROM (SELECT CounterID, EventDate FROM hits_10m_single) ORDER BY toFloat32(toFloat64(toFloat32(toFloat64(CounterID)))) FORMAT Null</query>
|
||||
<query>SELECT * FROM (SELECT CounterID, EventDate FROM hits_10m_single) ORDER BY toFloat32(toFloat64(toFloat32(toFloat64(CounterID)))) DESC, toFloat32(toFloat64(toFloat32(toFloat64(EventDate)))) ASC FORMAT Null</query>
|
||||
|
||||
</test>
|
||||
|
@ -1,14 +1,8 @@
|
||||
<test>
|
||||
|
||||
<tags>
|
||||
<tag>search</tag>
|
||||
</tags>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
|
||||
<settings>
|
||||
<max_memory_usage>20000000000</max_memory_usage>
|
||||
</settings>
|
||||
@ -24,7 +18,6 @@
|
||||
</substitution>
|
||||
</substitutions>
|
||||
|
||||
|
||||
<query>SELECT ngramDistance(Title, URL) AS distance FROM {small_table} FORMAT Null</query>
|
||||
<query>SELECT ngramDistance(Title, SearchPhrase) AS distance FROM {small_table} FORMAT Null</query>
|
||||
<query>SELECT ngramDistance(Title, 'what is love') AS distance FROM hits_10m_single FORMAT Null</query>
|
||||
@ -42,5 +35,4 @@
|
||||
<query>SELECT ngramDistanceCaseInsensitiveUTF8(Title, 'Метрика') AS distance FROM hits_10m_single FORMAT Null</query>
|
||||
<query>SELECT ngramDistanceCaseInsensitiveUTF8(URL, 'как дЕлА') AS distance FROM {small_table} FORMAT Null</query>
|
||||
<query>SELECT ngramDistanceCaseInsensitiveUTF8(URL, 'Чем зАнимаешЬся') AS distance FROM {small_table} FORMAT Null</query>
|
||||
|
||||
</test>
|
||||
|
@ -3,10 +3,6 @@
|
||||
<allow_experimental_nlp_functions>1</allow_experimental_nlp_functions>
|
||||
</settings>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<create_query>CREATE TABLE hits_100m_words (words Array(String), UserID UInt64) ENGINE Memory</create_query>
|
||||
<fill_query>INSERT INTO hits_100m_words SELECT splitByNonAlpha(SearchPhrase) AS words, UserID FROM hits_100m_single WHERE length(words) > 0</fill_query>
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<create_query>CREATE TABLE strings (words String) ENGINE Memory</create_query>
|
||||
<fill_query>INSERT INTO strings SELECT SearchPhrase FROM hits_10m_single WHERE length(SearchPhrase) > 0</fill_query>
|
||||
|
||||
|
@ -1,7 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<!-- Some queries are almost instantaneous index lookups, so we mark them as short. -->
|
||||
<query short="1">SELECT * FROM hits_100m_single ORDER BY CounterID, EventDate LIMIT 100</query>
|
||||
|
@ -4,12 +4,6 @@
|
||||
<tag>comparison</tag>
|
||||
</tags>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
|
||||
|
||||
<query>SELECT URL as col FROM hits_100m_single ORDER BY col LIMIT 1000,1</query>
|
||||
<query>SELECT SearchPhrase as col FROM hits_100m_single ORDER BY col LIMIT 10000,1</query>
|
||||
<query>SELECT SearchPhrase as col FROM hits_100m_single WHERE notEmpty(col) ORDER BY col LIMIT 10000,1</query>
|
||||
@ -17,5 +11,4 @@
|
||||
<query>SELECT MobilePhoneModel as col FROM hits_100m_single WHERE notEmpty(col) ORDER BY col LIMIT 500000,1</query>
|
||||
<query>SELECT PageCharset as col FROM hits_100m_single ORDER BY col LIMIT 10000,1</query>
|
||||
<query>SELECT Title as col FROM hits_100m_single ORDER BY col LIMIT 1000,1</query>
|
||||
|
||||
</test>
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<create_query>
|
||||
CREATE TABLE hits2 ENGINE MergeTree
|
||||
PARTITION BY toYYYYMM(EventDate)
|
||||
|
@ -1,9 +1,5 @@
|
||||
<test>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<substitutions>
|
||||
<substitution>
|
||||
<name>format</name>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<settings>
|
||||
<max_threads>1</max_threads>
|
||||
</settings>
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<substitutions>
|
||||
<substitution>
|
||||
<name>key</name>
|
||||
|
@ -1,10 +1,5 @@
|
||||
<test>
|
||||
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT count() FROM hits_100m_single where UserID=1234567890 SETTINGS max_threads = 1, min_bytes_to_use_direct_io = 1, max_read_buffer_size = 10485760;</query>
|
||||
<query>SELECT count() FROM hits_100m_single where EventDate between toDate('2013-07-10') and toDate('2013-07-16') and UserID=123 SETTINGS max_threads = 1, min_bytes_to_use_direct_io = 1, max_read_buffer_size = 10485760;</query>
|
||||
|
||||
|
@ -1,10 +1,5 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT CounterID, EventDate FROM hits_100m_single ORDER BY CounterID, exp(CounterID), sqrt(CounterID) FORMAT Null</query>
|
||||
<query>SELECT CounterID, EventDate FROM hits_100m_single ORDER BY CounterID, EventDate, exp(CounterID), toDateTime(EventDate) FORMAT Null</query>
|
||||
<query>SELECT CounterID, EventDate FROM hits_100m_single ORDER BY CounterID DESC, EventDate DESC, exp(CounterID), toDateTime(EventDate) FORMAT Null</query>
|
||||
|
||||
</test>
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<test>
|
||||
<query>SELECT avg(length(URL)) FROM hits_10m_single GROUP BY WatchID, CounterID FORMAT Null</query>
|
||||
<query>SELECT avg(length(URL)) FROM hits_10m_single GROUP BY WatchID, CounterID, WatchID - CounterID FORMAT Null</query>
|
||||
</test>
|
||||
|
@ -1,11 +1,4 @@
|
||||
<test>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
|
||||
|
||||
<substitutions>
|
||||
<substitution>
|
||||
<name>func</name>
|
||||
|
@ -42,10 +42,6 @@
|
||||
</substitution>
|
||||
</substitutions>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<create_query>CREATE TABLE IF NOT EXISTS table_{format_slow} ENGINE = File({format_slow}, '/dev/null') AS test.hits</create_query>
|
||||
<create_query>CREATE TABLE IF NOT EXISTS table_{format_fast} ENGINE = File({format_fast}, '/dev/null') AS test.hits</create_query>
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<!-- Queries with some matching rows -->
|
||||
<query>
|
||||
SELECT 1 FROM hits_10m_single GROUP BY EventTime HAVING
|
||||
|
@ -1,11 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<!-- We use smaller or larger table based on the result set for a particular
|
||||
query, so that it runs not too fast and not too slow. -->
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<!-- UserID is in primary key, run in one thread so that it's not too fast. -->
|
||||
<query>SELECT count() FROM hits_100m_single WHERE UserID IN (SELECT UserID FROM hits_100m_single WHERE AdvEngineID != 0) SETTINGS max_threads = 1</query>
|
||||
<query>SELECT count() FROM hits_10m_single WHERE UserID IN (SELECT UserID FROM hits_10m_single)</query>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(substring(URL, 10, 20))</query>
|
||||
<query>SELECT count() FROM hits_100m_single WHERE NOT ignore(substring(PageCharset, 1, 2))</query>
|
||||
</test>
|
||||
|
@ -1,11 +1,4 @@
|
||||
<test>
|
||||
|
||||
|
||||
|
||||
<preconditions>
|
||||
<table_exists>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>
|
||||
|
||||
|
@ -1,11 +1,4 @@
|
||||
<test>
|
||||
|
||||
|
||||
|
||||
<preconditions>
|
||||
<table_exists>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>
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<substitutions>
|
||||
<substitution>
|
||||
<name>str1</name>
|
||||
|
@ -1,9 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<substitutions>
|
||||
<substitution>
|
||||
<name>func_fast</name>
|
||||
|
@ -1,10 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
<ram_size>30000000000</ram_size>
|
||||
</preconditions>
|
||||
|
||||
<settings>
|
||||
<max_memory_usage>30000000000</max_memory_usage>
|
||||
<!--
|
||||
|
@ -1,11 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
|
||||
<substitutions>
|
||||
<substitution>
|
||||
<name>func_slow</name>
|
||||
|
@ -1,10 +1,4 @@
|
||||
<test>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>hits_10m_single</table_exists>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<settings>
|
||||
<max_memory_usage>30000000000</max_memory_usage>
|
||||
</settings>
|
||||
|
@ -1,8 +1,4 @@
|
||||
<test>
|
||||
<preconditions>
|
||||
<table_exists>hits_100m_single</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<!--
|
||||
For some counters, find top 10 users by the numer of records.
|
||||
First with LIMIT BY, next with window functions.
|
||||
|
@ -14,10 +14,6 @@
|
||||
</substitution>
|
||||
</substitutions>
|
||||
|
||||
<preconditions>
|
||||
<table_exists>test.hits</table_exists>
|
||||
</preconditions>
|
||||
|
||||
<create_query>CREATE TABLE IF NOT EXISTS table_{format} ENGINE = File({format}, '/dev/null') AS SELECT SearchPhrase, ClientIP6, URL, Referer, URLDomain FROM test.hits limit 0</create_query>
|
||||
|
||||
<query>INSERT INTO table_{format} SELECT SearchPhrase, ClientIP6, URL, Referer, URLDomain FROM test.hits LIMIT 100000</query>
|
||||
|
@ -23,11 +23,6 @@
|
||||
-- <tag>comparison</tag>
|
||||
-- </tags>
|
||||
|
||||
-- <preconditions>
|
||||
-- <table_exists>hits_100m_single</table_exists>
|
||||
-- </preconditions>
|
||||
|
||||
|
||||
-- <query short="1"><![CDATA[SELECT count() FROM hits_100m_single WHERE URL < URL]]></query>
|
||||
-- <query><![CDATA[SELECT count() FROM hits_100m_single WHERE URL < PageCharset]]></query>
|
||||
-- <query short="1"><![CDATA[SELECT count() FROM hits_100m_single WHERE SearchPhrase < SearchPhrase SETTINGS max_threads = 2]]></query>
|
||||
|
Loading…
Reference in New Issue
Block a user