提交 7e658532 编写于 作者: A Alexander Kuzmenkov

fixup

上级 dfafac73
......@@ -44,18 +44,19 @@
</substitutions>
<create_query>
CREATE TABLE nums ENGINE Memory
AS SELECT
toUInt8(x),
toUInt16(x),
toUInt32(x),
toUInt64(x),
toInt8(x),
toInt16(x),
toInt32(x),
toInt64(x),
toFloat32(x),
toFloat64(x)
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
;
......
......@@ -16,7 +16,7 @@
<substitution>
<name>millions</name>
<values>
<value>200</value>
<value>50</value>
<value>100</value>
</values>
</substitution>
......@@ -34,7 +34,7 @@
<create_query>optimize table moving_sum_{millions}m final</create_query>
<query>select k, groupArrayMovingSum({window})(v) from moving_sum_{millions}m group by k format Null</query>
<query>select k, groupArrayMovingSum({window})(v) from moving_sum_{millions}m where k &lt; 20 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>
<drop_query>drop table if exists moving_sum_{millions}m</drop_query>
</test>
......@@ -19,7 +19,7 @@
parts_to_throw_insert = 5000
AS
-- don't select all columns to keep the run time down
SELECT CounterID, EventDate, UserID, Referer, WatchID
SELECT CounterID, EventDate, UserID, Title
FROM hits_10m_single
-- do not select anything because we only need column types
LIMIT 0
......@@ -29,7 +29,7 @@
<query>
INSERT INTO hits2
SELECT CounterID, EventDate, UserID, Referer, WatchID
SELECT CounterID, EventDate, UserID, Title
FROM hits_10m_single
</query>
......
......@@ -31,13 +31,13 @@
</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} 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 hits_100m_single WHERE AdvEngineID != 0 GROUP BY AdvEngineID ORDER BY count() DESC LIMIT 10</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 hits_100m_single WHERE MobilePhoneModel != '' GROUP BY MobilePhoneModel ORDER BY u DESC LIMIT 10</query>
......@@ -49,7 +49,7 @@
<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 count() FROM hits_100m_single WHERE UserID = 12345678901234567890</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>
......@@ -65,7 +65,7 @@
<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>
......
......@@ -278,7 +278,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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册