2020-02-13 21:34:23 +00:00
|
|
|
<test>
|
|
|
|
|
|
|
|
|
|
|
|
<settings>
|
|
|
|
<max_threads>1</max_threads>
|
|
|
|
</settings>
|
|
|
|
|
|
|
|
<substitutions>
|
|
|
|
<substitution>
|
2020-04-16 20:54:52 +00:00
|
|
|
<name>aggregationscale_all</name>
|
2020-02-13 21:34:23 +00:00
|
|
|
<values>
|
2020-04-22 01:49:59 +00:00
|
|
|
<value>5555555</value>
|
|
|
|
<value>555555</value>
|
2020-02-28 18:32:15 +00:00
|
|
|
<value>111111</value>
|
2020-02-13 21:34:23 +00:00
|
|
|
<value>11111</value>
|
|
|
|
</values>
|
|
|
|
</substitution>
|
2020-04-16 20:54:52 +00:00
|
|
|
<substitution>
|
|
|
|
<name>aggregationscale_small</name>
|
|
|
|
<values>
|
|
|
|
<value>111111</value>
|
|
|
|
<value>11111</value>
|
|
|
|
</values>
|
|
|
|
</substitution>
|
|
|
|
<substitution>
|
|
|
|
<name>aggregationscale_big</name>
|
|
|
|
<values>
|
2020-04-22 01:49:59 +00:00
|
|
|
<value>5555555</value>
|
|
|
|
<value>555555</value>
|
2020-04-16 20:54:52 +00:00
|
|
|
</values>
|
|
|
|
</substitution>
|
2020-02-13 21:34:23 +00:00
|
|
|
</substitutions>
|
|
|
|
|
|
|
|
<create_query>
|
2020-04-16 20:54:52 +00:00
|
|
|
create table mingroupby_orderbylimit1_{aggregationscale_all}_tuple
|
2020-02-14 03:00:18 +00:00
|
|
|
Engine=MergeTree order by tuple() AS
|
2020-04-16 20:54:52 +00:00
|
|
|
select toUInt64( number % {aggregationscale_all} ) key, toUInt64(1) value
|
2020-02-28 18:32:15 +00:00
|
|
|
from numbers(2000000);
|
2020-02-13 21:34:23 +00:00
|
|
|
</create_query>
|
2020-02-14 03:00:18 +00:00
|
|
|
|
|
|
|
<create_query>
|
2020-04-16 20:54:52 +00:00
|
|
|
create table mingroupby_orderbylimit1_{aggregationscale_all}_key_value
|
2020-02-14 03:00:18 +00:00
|
|
|
Engine=MergeTree order by (key,value) AS
|
2020-04-16 20:54:52 +00:00
|
|
|
select toUInt64( number % {aggregationscale_all} ) key, toUInt64(1) value
|
2020-02-28 18:32:15 +00:00
|
|
|
from numbers(2000000);
|
2020-02-14 03:00:18 +00:00
|
|
|
</create_query>
|
|
|
|
|
|
|
|
<query tag='UsingGroupbyMinTuple'>
|
2020-02-13 21:34:23 +00:00
|
|
|
SELECT key, min(value)
|
2020-04-16 20:54:52 +00:00
|
|
|
FROM mingroupby_orderbylimit1_{aggregationscale_big}_tuple
|
2020-02-13 21:34:23 +00:00
|
|
|
group by key format Null;
|
|
|
|
</query>
|
2020-02-14 03:00:18 +00:00
|
|
|
|
|
|
|
<query tag='UsingGroupbyMinKV'>
|
|
|
|
SELECT key, min(value)
|
2020-04-16 20:54:52 +00:00
|
|
|
FROM mingroupby_orderbylimit1_{aggregationscale_big}_key_value
|
2020-02-14 03:00:18 +00:00
|
|
|
group by key format Null;
|
|
|
|
</query>
|
|
|
|
|
|
|
|
<query tag='UsingOrderbyLimit1Tuple'>
|
|
|
|
SELECT key, value
|
2020-04-16 20:54:52 +00:00
|
|
|
FROM mingroupby_orderbylimit1_{aggregationscale_small}_tuple
|
2020-02-14 03:00:18 +00:00
|
|
|
order by key, value limit 1 by key format Null;
|
|
|
|
</query>
|
2020-02-13 21:34:23 +00:00
|
|
|
|
2020-02-14 03:00:18 +00:00
|
|
|
<query tag='UsingOrderbyLimit1KV'>
|
2020-02-13 21:34:23 +00:00
|
|
|
SELECT key, value
|
2020-04-16 20:54:52 +00:00
|
|
|
FROM mingroupby_orderbylimit1_{aggregationscale_small}_key_value
|
2020-02-13 21:34:23 +00:00
|
|
|
order by key, value limit 1 by key format Null;
|
|
|
|
</query>
|
2020-02-14 03:00:18 +00:00
|
|
|
|
2020-04-16 20:54:52 +00:00
|
|
|
<drop_query> DROP TABLE IF EXISTS mingroupby_orderbylimit1_{aggregationscale_all}_tuple </drop_query>
|
|
|
|
<drop_query> DROP TABLE IF EXISTS mingroupby_orderbylimit1_{aggregationscale_all}_key_value </drop_query>
|
2020-02-13 21:34:23 +00:00
|
|
|
|
|
|
|
</test>
|