Merge pull request #9611 from ClickHouse/aku/fix-some-perf-tests

Fix some performance tests
This commit is contained in:
alexey-milovidov 2020-03-13 22:30:26 +03:00 committed by GitHub
commit 930f2bae54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 109 additions and 92 deletions

View File

@ -10,6 +10,10 @@
</any_of>
</stop_conditions>
<settings>
<max_memory_usage>30000000000</max_memory_usage>
</settings>
<substitutions>
<substitution>
<name>arg</name>
@ -34,45 +38,30 @@
<value>multiply</value>
<value>divide</value>
<value>intDivOrZero</value>
<value>modulo</value>
<value>moduloOrZero</value>
</values>
</substitution>
</substitutions>
<create_query>
CREATE TABLE nums
(
u8 UInt8,
u16 UInt16,
u32 UInt32,
u64 UInt64,
i8 Int8,
i16 Int16,
i32 Int32,
i64 Int64,
f32 Float32,
f64 Float64
) ENGINE = Memory;
CREATE TABLE nums ENGINE Memory AS
WITH number as x
SELECT
toUInt8(x) u8,
toUInt16(x) u16,
toUInt32(x) u32,
toUInt64(x) u64,
toInt8(x) i8,
toInt16(x) i16,
toInt32(x) i32,
toInt64(x) i64,
toFloat32(x) f32,
toFloat64(x) f64
FROM numbers_mt(200000000)
SETTINGS max_threads = 4
;
</create_query>
<fill_query>
INSERT INTO nums
WITH cityHash64(number) AS x
SELECT
toUInt8(x),
toUInt16(x),
toUInt32(x),
toUInt64(x),
toInt8(x),
toInt16(x),
toInt32(x),
toInt64(x),
toFloat32(x),
toFloat64(x)
FROM numbers(100000000);
</fill_query>
<query>SELECT count() FROM nums WHERE NOT ignore({op}({arg}, {arg}))</query>
<drop_query>DROP TABLE nums</drop_query>

View File

@ -1,6 +1,4 @@
<test>
<stop_conditions>
<all_of>
<total_time_ms>30000</total_time_ms>
@ -10,27 +8,33 @@
</any_of>
</stop_conditions>
<settings>
<max_memory_usage>30000000000</max_memory_usage>
</settings>
<create_query>CREATE TABLE moving_sum_100m(k UInt64, v UInt64) ENGINE = MergeTree ORDER BY k</create_query>
<create_query>CREATE TABLE moving_sum_1000m(k UInt64, v UInt64) ENGINE = MergeTree ORDER BY k</create_query>
<substitutions>
<substitution>
<name>millions</name>
<values>
<value>50</value>
<value>100</value>
</values>
</substitution>
<substitution>
<name>window</name>
<values>
<value>10</value>
<value>1000</value>
<value>10000</value>
</values>
</substitution>
</substitutions>
<fill_query>INSERT INTO moving_sum_100m SELECT number%100, rand() from numbers(100000000)</fill_query>
<fill_query>INSERT INTO moving_sum_1000m SELECT number%100, rand() from numbers(1000000000)</fill_query>
<create_query>create table moving_sum_{millions}m engine MergeTree order by k as select number % 100 k, rand() v from numbers_mt(1000000 * {millions})</create_query>
<create_query>optimize table moving_sum_{millions}m final</create_query>
<query tag='MovingSumSize10_1M'>SELECT k,groupArrayMovingSum(10)(v) FROM moving_sum_100m GROUP BY k FORMAT Null</query>
<query tag='MovingSumSize10WithKey_1M'>SELECT k,groupArrayMovingSum(10)(v) FROM moving_sum_100m WHERE k in (49, 50, 51) GROUP BY k FORMAT Null</query>
<query tag='MovingSumSize1000_1M'>SELECT k,groupArrayMovingSum(1000)(v) FROM moving_sum_100m GROUP BY k FORMAT Null</query>
<query tag='MovingSumSize1000WithKey_1M'>SELECT k,groupArrayMovingSum(1000)(v) FROM moving_sum_100m WHERE k in (49, 50, 51) GROUP BY k FORMAT Null</query>
<query tag='MovingSumSize10000_1M'>SELECT k,groupArrayMovingSum(10000)(v) FROM moving_sum_100m GROUP BY k FORMAT Null</query>
<query tag='MovingSumSize10000WithKey_1M'>SELECT k,groupArrayMovingSum(10000)(v) FROM moving_sum_100m WHERE k in (49, 50, 51) GROUP BY k FORMAT Null</query>
<query>select k, groupArrayMovingSum({window})(v) from moving_sum_{millions}m group by k format Null</query>
<query>select k % 10 kk, groupArrayMovingSum({window})(v) from moving_sum_{millions}m group by kk format Null</query>
<query tag='MovingSumSize10_10M'>SELECT k,groupArrayMovingSum(10)(v) FROM moving_sum_1000m GROUP BY k FORMAT Null</query>
<query tag='MovingSumSize10WithKey_10M'>SELECT k,groupArrayMovingSum(10)(v) FROM moving_sum_1000m WHERE k in (49, 50, 51) GROUP BY k FORMAT Null</query>
<query tag='MovingSumSize1000_10M'>SELECT k,groupArrayMovingSum(1000)(v) FROM moving_sum_1000m GROUP BY k FORMAT Null</query>
<query tag='MovingSumSize1000WithKey_10M'>SELECT k,groupArrayMovingSum(1000)(v) FROM moving_sum_1000m WHERE k in (49, 50, 51) GROUP BY k FORMAT Null</query>
<query tag='MovingSumSize10000_10M'>SELECT k,groupArrayMovingSum(10000)(v) FROM moving_sum_1000m GROUP BY k FORMAT Null</query>
<query tag='MovingSumSize10000WithKey_10M'>SELECT k,groupArrayMovingSum(10000)(v) FROM moving_sum_1000m WHERE k in (49, 50, 51) GROUP BY k FORMAT Null</query>
<drop_query>DROP TABLE IF EXISTS moving_sum_1000m</drop_query>
<drop_query>DROP TABLE IF EXISTS moving_sum_100m</drop_query>
<drop_query>drop table if exists moving_sum_{millions}m</drop_query>
</test>

View File

@ -22,6 +22,11 @@
</any_of>
</stop_conditions>
<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)')</query>
<query>select * from file('test_some_expr_matches.values', Values, 'i Int64, ari Array(Int64), ars Array(String)')</query>

View File

@ -9,11 +9,11 @@
<create_query>CREATE TABLE ints (i64 Int64, i32 Int32, i16 Int16, i8 Int8) ENGINE = Memory</create_query>
<fill_query>INSERT INTO ints SELECT number AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(50000)</fill_query>
<fill_query>INSERT INTO ints SELECT 10000 + number % 1000 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(50000)</fill_query>
<fill_query>INSERT INTO ints SELECT 20000 + number % 100 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(50000)</fill_query>
<fill_query>INSERT INTO ints SELECT 30000 + number % 10 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(50000)</fill_query>
<fill_query>INSERT INTO ints SELECT 40000 + number % 1 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(50000)</fill_query>
<fill_query>INSERT INTO ints SELECT number AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<fill_query>INSERT INTO ints SELECT 10000 + number % 1000 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<fill_query>INSERT INTO ints SELECT 20000 + number % 100 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<fill_query>INSERT INTO ints SELECT 30000 + number % 10 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<fill_query>INSERT INTO ints SELECT 40000 + number % 1 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<query tag='ANY LEFT'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 = 200042</query>
<query tag='ANY LEFT KEY'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042</query>
@ -40,8 +40,8 @@
<query tag='FULL ON'>SELECT COUNT() FROM ints l FULL JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042</query>
<query tag='FULL IN'>SELECT COUNT() FROM ints l FULL JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042)</query>
<query tag='CROSS'>SELECT COUNT() FROM ints l CROSS JOIN (SELECT number as i64 FROM numbers(4)) WHERE i32 = 42</query>
<query tag='CROSS KEY'>SELECT COUNT() FROM ints l CROSS JOIN (SELECT number as i64 FROM numbers(4)) WHERE i32 = 42</query>
<query tag='CROSS'>SELECT COUNT() FROM ints l CROSS JOIN (SELECT number as i64 FROM numbers(4)) r WHERE i32 = 42</query>
<query tag='CROSS KEY'>SELECT COUNT() FROM ints l CROSS JOIN (SELECT number as i64 FROM numbers(4)) r WHERE i32 = 42</query>
<drop_query>DROP TABLE IF EXISTS ints</drop_query>
</test>

View File

@ -1,23 +1,38 @@
<test>
<stop_conditions>
<any_of>
<iterations>2</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 hits2 AS hits_10m_single</create_query>
<fill_query>set max_insert_threads=8</fill_query>
<create_query>
CREATE TABLE hits2 ENGINE MergeTree
PARTITION BY toYYYYMM(EventDate)
ORDER BY (CounterID, EventDate, intHash32(UserID))
SAMPLE BY intHash32(UserID)
SETTINGS
parts_to_delay_insert = 5000,
parts_to_throw_insert = 5000
AS
-- don't select all columns to keep the run time down
SELECT CounterID, EventDate, UserID, Title
FROM hits_10m_single
-- do not select anything because we only need column types
LIMIT 0
</create_query>
<fill_query>SET max_insert_threads=8</fill_query>
<fill_query>SYSTEM STOP MERGES</fill_query>
<query>INSERT INTO hits2 SELECT * FROM hits_10m_single</query>
<query>
INSERT INTO hits2
SELECT CounterID, EventDate, UserID, Title
FROM hits_10m_single
</query>
<drop_query>SYSTEM START MERGES</drop_query>
<drop_query>DROP TABLE IF EXISTS hits2</drop_query>
</test>

View File

@ -6,6 +6,10 @@
</any_of>
</stop_conditions>
<settings>
<max_memory_usage>30000000000</max_memory_usage>
</settings>
<!-- 9. Генератор случайных чисел.
Функция rand представляет собой linear congruential generator (то есть, целочисленное умножение на константу и сложение с константой), возвращающий 32-битные целые случайные числа.

View File

@ -17,7 +17,7 @@
<settings>
<max_memory_usage>20000000000</max_memory_usage>
<max_memory_usage>30000000000</max_memory_usage>
</settings>
<substitutions>
@ -31,47 +31,47 @@
</substitutions>
<query>SELECT count() FROM {table}</query>
<query>SELECT count() FROM {table} WHERE AdvEngineID != 0</query>
<query>SELECT count() FROM hits_10m_single WHERE AdvEngineID != 0</query>
<query>SELECT sum(AdvEngineID), count(), avg(ResolutionWidth) FROM {table}</query>
<query>SELECT sum(UserID) FROM {table}</query>
<query>SELECT uniq(UserID) FROM {table}</query>
<query>SELECT uniq(SearchPhrase) FROM {table}</query>
<query>SELECT uniq(UserID) FROM {table} FORMAT Null</query>
<query>SELECT uniq(SearchPhrase) FROM {table} FORMAT Null</query>
<query>SELECT min(EventDate), max(EventDate) FROM {table}</query>
<query>SELECT AdvEngineID, count() FROM {table} WHERE AdvEngineID != 0 GROUP BY AdvEngineID ORDER BY count() DESC</query>
<query>SELECT AdvEngineID, count() FROM hits_10m_single WHERE AdvEngineID != 0 GROUP BY AdvEngineID ORDER BY count() DESC LIMIT 10</query>
<query>SELECT RegionID, uniq(UserID) AS u FROM {table} GROUP BY RegionID ORDER BY u DESC LIMIT 10</query>
<query>SELECT RegionID, sum(AdvEngineID), count() AS c, avg(ResolutionWidth), uniq(UserID) FROM {table} GROUP BY RegionID ORDER BY c DESC LIMIT 10</query>
<query>SELECT MobilePhoneModel, uniq(UserID) AS u FROM {table} WHERE MobilePhoneModel != '' GROUP BY MobilePhoneModel ORDER BY u DESC LIMIT 10</query>
<query>SELECT MobilePhoneModel, uniq(UserID) AS u FROM hits_100m_single WHERE MobilePhoneModel != '' GROUP BY MobilePhoneModel ORDER BY u DESC LIMIT 10</query>
<query>SELECT MobilePhone, MobilePhoneModel, uniq(UserID) AS u FROM {table} WHERE MobilePhoneModel != '' GROUP BY MobilePhone, MobilePhoneModel ORDER BY u DESC LIMIT 10</query>
<query>SELECT SearchPhrase, count() AS c FROM {table} WHERE SearchPhrase != '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10</query>
<query>SELECT SearchPhrase, count() AS c FROM hits_100m_single WHERE SearchPhrase != '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10</query>
<query>SELECT SearchPhrase, uniq(UserID) AS u FROM {table} WHERE SearchPhrase != '' GROUP BY SearchPhrase ORDER BY u DESC LIMIT 10</query>
<query>SELECT SearchEngineID, SearchPhrase, count() AS c FROM {table} WHERE SearchPhrase != '' GROUP BY SearchEngineID, SearchPhrase ORDER BY c DESC LIMIT 10</query>
<query>SELECT UserID, count() FROM {table} GROUP BY UserID ORDER BY count() DESC LIMIT 10</query>
<query>SELECT UserID, SearchPhrase, count() FROM {table} GROUP BY UserID, SearchPhrase ORDER BY count() DESC LIMIT 10</query>
<query>SELECT UserID, SearchPhrase, count() FROM {table} GROUP BY UserID, SearchPhrase LIMIT 10</query>
<query>SELECT UserID, toMinute(EventTime) AS m, SearchPhrase, count() FROM {table} GROUP BY UserID, m, SearchPhrase ORDER BY count() DESC LIMIT 10</query>
<query>SELECT UserID FROM {table} WHERE UserID = 12345678901234567890</query>
<query>SELECT count() FROM {table} WHERE URL LIKE '%metrika%'</query>
<query>SELECT SearchPhrase, any(URL), count() AS c FROM {table} WHERE URL LIKE '%metrika%' AND SearchPhrase != '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10</query>
<query>SELECT count() FROM hits_10m_single WHERE UserID = 12345678901234567890</query>
<query>SELECT count() FROM hits_100m_single WHERE URL LIKE '%metrika%'</query>
<query>SELECT SearchPhrase, any(URL), count() AS c FROM hits_100m_single WHERE URL LIKE '%metrika%' AND SearchPhrase != '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10</query>
<query>SELECT SearchPhrase, any(URL), any(Title), count() AS c, uniq(UserID) FROM {table} WHERE Title LIKE '%Яндекс%' AND URL NOT LIKE '%.yandex.%' AND SearchPhrase != '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10</query>
<query>SELECT * FROM {table} WHERE URL LIKE '%metrika%' ORDER BY EventTime LIMIT 10</query>
<query>SELECT SearchPhrase FROM {table} WHERE SearchPhrase != '' ORDER BY EventTime LIMIT 10</query>
<query>SELECT SearchPhrase FROM {table} WHERE SearchPhrase != '' ORDER BY SearchPhrase LIMIT 10</query>
<query>SELECT SearchPhrase FROM {table} WHERE SearchPhrase != '' ORDER BY EventTime, SearchPhrase LIMIT 10</query>
<query>SELECT SearchPhrase FROM hits_100m_single WHERE SearchPhrase != '' ORDER BY EventTime LIMIT 10</query>
<query>SELECT SearchPhrase FROM hits_100m_single WHERE SearchPhrase != '' ORDER BY SearchPhrase LIMIT 10</query>
<query>SELECT SearchPhrase FROM hits_100m_single WHERE SearchPhrase != '' ORDER BY EventTime, SearchPhrase LIMIT 10</query>
<query>SELECT CounterID, avg(length(URL)) AS l, count() AS c FROM {table} WHERE URL != '' GROUP BY CounterID HAVING c > 100000 ORDER BY l DESC LIMIT 25</query>
<query>SELECT domainWithoutWWW(Referer) AS key, avg(length(Referer)) AS l, count() AS c, any(Referer) FROM {table} WHERE Referer != '' GROUP BY key HAVING c > 100000 ORDER BY l DESC LIMIT 25</query>
<query>SELECT sum(ResolutionWidth), sum(ResolutionWidth + 1), sum(ResolutionWidth + 2), sum(ResolutionWidth + 3), sum(ResolutionWidth + 4), sum(ResolutionWidth + 5), sum(ResolutionWidth + 6), sum(ResolutionWidth + 7), sum(ResolutionWidth + 8), sum(ResolutionWidth + 9), sum(ResolutionWidth + 10), sum(ResolutionWidth + 11), sum(ResolutionWidth + 12), sum(ResolutionWidth + 13), sum(ResolutionWidth + 14), sum(ResolutionWidth + 15), sum(ResolutionWidth + 16), sum(ResolutionWidth + 17), sum(ResolutionWidth + 18), sum(ResolutionWidth + 19), sum(ResolutionWidth + 20), sum(ResolutionWidth + 21), sum(ResolutionWidth + 22), sum(ResolutionWidth + 23), sum(ResolutionWidth + 24), sum(ResolutionWidth + 25), sum(ResolutionWidth + 26), sum(ResolutionWidth + 27), sum(ResolutionWidth + 28), sum(ResolutionWidth + 29), sum(ResolutionWidth + 30), sum(ResolutionWidth + 31), sum(ResolutionWidth + 32), sum(ResolutionWidth + 33), sum(ResolutionWidth + 34), sum(ResolutionWidth + 35), sum(ResolutionWidth + 36), sum(ResolutionWidth + 37), sum(ResolutionWidth + 38), sum(ResolutionWidth + 39), sum(ResolutionWidth + 40), sum(ResolutionWidth + 41), sum(ResolutionWidth + 42), sum(ResolutionWidth + 43), sum(ResolutionWidth + 44), sum(ResolutionWidth + 45), sum(ResolutionWidth + 46), sum(ResolutionWidth + 47), sum(ResolutionWidth + 48), sum(ResolutionWidth + 49), sum(ResolutionWidth + 50), sum(ResolutionWidth + 51), sum(ResolutionWidth + 52), sum(ResolutionWidth + 53), sum(ResolutionWidth + 54), sum(ResolutionWidth + 55), sum(ResolutionWidth + 56), sum(ResolutionWidth + 57), sum(ResolutionWidth + 58), sum(ResolutionWidth + 59), sum(ResolutionWidth + 60), sum(ResolutionWidth + 61), sum(ResolutionWidth + 62), sum(ResolutionWidth + 63), sum(ResolutionWidth + 64), sum(ResolutionWidth + 65), sum(ResolutionWidth + 66), sum(ResolutionWidth + 67), sum(ResolutionWidth + 68), sum(ResolutionWidth + 69), sum(ResolutionWidth + 70), sum(ResolutionWidth + 71), sum(ResolutionWidth + 72), sum(ResolutionWidth + 73), sum(ResolutionWidth + 74), sum(ResolutionWidth + 75), sum(ResolutionWidth + 76), sum(ResolutionWidth + 77), sum(ResolutionWidth + 78), sum(ResolutionWidth + 79), sum(ResolutionWidth + 80), sum(ResolutionWidth + 81), sum(ResolutionWidth + 82), sum(ResolutionWidth + 83), sum(ResolutionWidth + 84), sum(ResolutionWidth + 85), sum(ResolutionWidth + 86), sum(ResolutionWidth + 87), sum(ResolutionWidth + 88), sum(ResolutionWidth + 89) FROM {table}</query>
<query>SELECT SearchEngineID, ClientIP, count() AS c, sum(Refresh), avg(ResolutionWidth) FROM {table} WHERE SearchPhrase != '' GROUP BY SearchEngineID, ClientIP ORDER BY c DESC LIMIT 10</query>
<query>SELECT SearchEngineID, ClientIP, count() AS c, sum(Refresh), avg(ResolutionWidth) FROM hits_100m_single WHERE SearchPhrase != '' GROUP BY SearchEngineID, ClientIP ORDER BY c DESC LIMIT 10</query>
<query>SELECT WatchID, ClientIP, count() AS c, sum(Refresh), avg(ResolutionWidth) FROM {table} WHERE SearchPhrase != '' GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10</query>
<query>SELECT WatchID, ClientIP, count() AS c, sum(Refresh), avg(ResolutionWidth) FROM {table} GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10</query>
<query>SELECT WatchID, ClientIP, count() AS c, sum(Refresh), avg(ResolutionWidth) FROM hits_10m_single GROUP BY WatchID, ClientIP ORDER BY c DESC LIMIT 10</query>
<query>SELECT URL, count() AS c FROM {table} GROUP BY URL ORDER BY c DESC LIMIT 10</query>
<query>SELECT 1, URL, count() AS c FROM {table} GROUP BY 1, URL ORDER BY c DESC LIMIT 10</query>
<query>SELECT ClientIP AS x, x - 1, x - 2, x - 3, count() AS c FROM {table} GROUP BY x, x - 1, x - 2, x - 3 ORDER BY c DESC LIMIT 10</query>
<query>SELECT ClientIP AS x, x - 1, x - 2, x - 3, count() AS c FROM hits_100m_single GROUP BY x, x - 1, x - 2, x - 3 ORDER BY c DESC LIMIT 10</query>
<query>SELECT URL, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT DontCountHits AND NOT Refresh AND notEmpty(URL) GROUP BY URL ORDER BY PageViews DESC LIMIT 10</query>
<query>SELECT Title, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT DontCountHits AND NOT Refresh AND notEmpty(Title) GROUP BY Title ORDER BY PageViews DESC LIMIT 10</query>
<query>SELECT URL, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh AND IsLink AND NOT IsDownload GROUP BY URL ORDER BY PageViews DESC LIMIT 1000</query>
<query>SELECT TraficSourceID, SearchEngineID, AdvEngineID, ((SearchEngineID = 0 AND AdvEngineID = 0) ? Referer : '') AS Src, URL AS Dst, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh GROUP BY TraficSourceID, SearchEngineID, AdvEngineID, Src, Dst ORDER BY PageViews DESC LIMIT 1000</query>
<query>SELECT URLHash, EventDate, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh AND TraficSourceID IN (-1, 6) AND RefererHash = halfMD5('http://example.ru/') GROUP BY URLHash, EventDate ORDER BY PageViews DESC LIMIT 100</query>
<query>SELECT WindowClientWidth, WindowClientHeight, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh AND NOT DontCountHits AND URLHash = halfMD5('http://example.ru/') GROUP BY WindowClientWidth, WindowClientHeight ORDER BY PageViews DESC LIMIT 10000</query>
<query>SELECT toStartOfMinute(EventTime) AS Minute, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-02' AND NOT Refresh AND NOT DontCountHits GROUP BY Minute ORDER BY Minute</query>
<query>SELECT WindowClientWidth, WindowClientHeight, count() AS PageViews FROM hits_100m_single WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh AND NOT DontCountHits AND URLHash = halfMD5('http://example.ru/') GROUP BY WindowClientWidth, WindowClientHeight ORDER BY PageViews DESC LIMIT 10000 FORMAT Null</query>
<query>SELECT toStartOfMinute(EventTime) AS Minute, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-02' AND NOT Refresh AND NOT DontCountHits GROUP BY Minute ORDER BY Minute FORMAT Null</query>
</test>

View File

@ -292,7 +292,7 @@ create table queries engine Memory as select
-- immediately, so for now we pretend they don't exist. We don't want to
-- remove them altogether because we want to be able to detect regressions,
-- but the right way to do this is not yet clear.
left + right < 0.01 as short,
left + right < 0.02 as short,
not short and abs(diff) < 0.10 and rd[3] > 0.10 as unstable,

View File

@ -104,7 +104,7 @@ tables = [e.text for e in root.findall('preconditions/table_exists')]
for t in tables:
for c in connections:
try:
res = c.execute("show create table {}".format(t))
res = c.execute("select 1 from {} limit 1".format(t))
except:
print('skipped\t' + traceback.format_exception_only(*sys.exc_info()[:2])[-1])
traceback.print_exc()

View File

@ -261,20 +261,20 @@ print("""
if slow_average_tests:
#status = 'failure'
message_array.append(str(slow_average_tests) + ' too long')
message_array.append(str(slow_average_tests) + ' 🕐')
if faster_queries:
message_array.append(str(faster_queries) + ' faster')
message_array.append(str(faster_queries) + ' 🐇')
if slower_queries:
message_array.append(str(slower_queries) + ' slower')
message_array.append(str(slower_queries) + ' 🐌')
if unstable_queries:
message_array.append(str(unstable_queries) + ' unstable')
message_array.append(str(unstable_queries) + ' ')
error_tests += slow_average_tests
if error_tests:
message_array.append(str(error_tests) + ' errors')
message_array.append(str(error_tests) + ' ')
if message_array:
message = ', '.join(message_array)