From fa62be250f02db7128aa539c3a037d964cc22955 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Thu, 16 Apr 2020 23:54:52 +0300 Subject: [PATCH] performance comparison --- tests/performance/array_fill.xml | 6 +-- .../performance/mingroupby-orderbylimit1.xml | 37 +++++++++++++------ tests/performance/simple_join_query.xml | 2 +- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/tests/performance/array_fill.xml b/tests/performance/array_fill.xml index d29e02730a3..b858ba03c8e 100644 --- a/tests/performance/array_fill.xml +++ b/tests/performance/array_fill.xml @@ -1,8 +1,8 @@ SELECT arraySlice(arrayFill(x -> ((x % 2) >= 0), range(100000000)), 1, 10) FORMAT Null - SELECT arraySlice(arrayFill(x -> (((x.1) % 2) >= 0), arrayMap(x -> (x, toString(x)), range(100000000))), 1, 10) FORMAT Null + SELECT arraySlice(arrayFill(x -> (((x.1) % 2) >= 0), arrayMap(x -> (x, toString(x)), range(10000000))), 1, 10) FORMAT Null SELECT arraySlice(arrayFill(x -> ((x % 2) >= 2), range(100000000)), 1, 10) FORMAT Null - SELECT arraySlice(arrayFill(x -> (((x.1) % 2) >= 2), arrayMap(x -> (x, toString(x)), range(100000000))), 1, 10) FORMAT Null + SELECT arraySlice(arrayFill(x -> (((x.1) % 2) >= 2), arrayMap(x -> (x, toString(x)), range(10000000))), 1, 10) FORMAT Null SELECT arraySlice(arrayFill(x -> ((x % 2) = 0), range(100000000)), 1, 10) FORMAT Null - SELECT arraySlice(arrayFill(x -> (((x.1) % 2) = 0), arrayMap(x -> (x, toString(x)), range(100000000))), 1, 10) FORMAT Null + SELECT arraySlice(arrayFill(x -> (((x.1) % 2) = 0), arrayMap(x -> (x, toString(x)), range(10000000))), 1, 10) FORMAT Null diff --git a/tests/performance/mingroupby-orderbylimit1.xml b/tests/performance/mingroupby-orderbylimit1.xml index 34cd992558b..306095a7e1c 100644 --- a/tests/performance/mingroupby-orderbylimit1.xml +++ b/tests/performance/mingroupby-orderbylimit1.xml @@ -12,53 +12,68 @@ - aggregationscale + aggregationscale_all + + 1111111 + 111111 + 11111 + + + + aggregationscale_small 111111 11111 + + aggregationscale_big + + 1111111 + 111111 + + - create table mingroupby_orderbylimit1_{aggregationscale}_tuple + create table mingroupby_orderbylimit1_{aggregationscale_all}_tuple Engine=MergeTree order by tuple() AS - select toUInt64( number % {aggregationscale} ) key, toUInt64(1) value + select toUInt64( number % {aggregationscale_all} ) key, toUInt64(1) value from numbers(2000000); - create table mingroupby_orderbylimit1_{aggregationscale}_key_value + create table mingroupby_orderbylimit1_{aggregationscale_all}_key_value Engine=MergeTree order by (key,value) AS - select toUInt64( number % {aggregationscale} ) key, toUInt64(1) value + select toUInt64( number % {aggregationscale_all} ) key, toUInt64(1) value from numbers(2000000); SELECT key, min(value) - FROM mingroupby_orderbylimit1_{aggregationscale}_tuple + FROM mingroupby_orderbylimit1_{aggregationscale_big}_tuple group by key format Null; SELECT key, min(value) - FROM mingroupby_orderbylimit1_{aggregationscale}_key_value + FROM mingroupby_orderbylimit1_{aggregationscale_big}_key_value group by key format Null; SELECT key, value - FROM mingroupby_orderbylimit1_{aggregationscale}_tuple + FROM mingroupby_orderbylimit1_{aggregationscale_small}_tuple order by key, value limit 1 by key format Null; SELECT key, value - FROM mingroupby_orderbylimit1_{aggregationscale}_key_value + FROM mingroupby_orderbylimit1_{aggregationscale_small}_key_value order by key, value limit 1 by key format Null; - DROP TABLE IF EXISTS mingroupby_orderbylimit1_{aggregationscale}_tuple - DROP TABLE IF EXISTS mingroupby_orderbylimit1_{aggregationscale}_key_value + DROP TABLE IF EXISTS mingroupby_orderbylimit1_{aggregationscale_all}_tuple + DROP TABLE IF EXISTS mingroupby_orderbylimit1_{aggregationscale_all}_key_value diff --git a/tests/performance/simple_join_query.xml b/tests/performance/simple_join_query.xml index 8f62ffdfd00..92fdfd23f93 100644 --- a/tests/performance/simple_join_query.xml +++ b/tests/performance/simple_join_query.xml @@ -12,7 +12,7 @@ CREATE TABLE join_table(A Int64, S0 String, S1 String, S2 String, S3 String) ENGINE = MergeTree ORDER BY A - INSERT INTO join_table SELECT number AS A, toString(arrayMap(x->x, range(100))) S0, S0 AS S1, S0 AS S2, S0 AS S3 from numbers(500000) + INSERT INTO join_table SELECT number AS A, toString(arrayMap(x->x, range(100))) S0, S0 AS S1, S0 AS S2, S0 AS S3 from numbers_mt(5000000) SELECT COUNT() FROM join_table LEFT JOIN join_table USING A SELECT COUNT() FROM join_table LEFT JOIN (SELECT A FROM join_table) AS right USING A