From c32b62ae9140c722d8bbfdc2016177ffe84c2cc0 Mon Sep 17 00:00:00 2001 From: Alexander Kazakov Date: Fri, 28 Feb 2020 16:12:16 +0300 Subject: [PATCH] Added medium and large tests --- .../performance/logical_functions_large.xml | 51 ++++++++++++++++ .../performance/logical_functions_medium.xml | 59 +++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 dbms/tests/performance/logical_functions_large.xml create mode 100644 dbms/tests/performance/logical_functions_medium.xml diff --git a/dbms/tests/performance/logical_functions_large.xml b/dbms/tests/performance/logical_functions_large.xml new file mode 100644 index 00000000000..91bf9c75936 --- /dev/null +++ b/dbms/tests/performance/logical_functions_large.xml @@ -0,0 +1,51 @@ + + 1 + loop + + + + 60 + 30000 + + + 120 + 60000 + + + + + 1 + + + SELECT count() FROM + (SELECT materialize(1) AS x1, materialize(1) AS x2, materialize(1) AS x3, materialize(1) AS x4, materialize(1) AS x5, materialize(1) AS x6, materialize(1) AS x7, materialize(1) AS x8, materialize(1) AS x9, materialize(1) AS x10 FROM numbers(40000000)) + WHERE NOT ignore(and(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)) + SELECT count() FROM + (SELECT materialize(0) AS x1, materialize(0) AS x2, materialize(0) AS x3, materialize(0) AS x4, materialize(0) AS x5, materialize(0) AS x6, materialize(0) AS x7, materialize(0) AS x8, materialize(0) AS x9, materialize(0) AS x10 FROM numbers(200000000)) + WHERE NOT ignore(and(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)) + SELECT count() FROM + (SELECT materialize(0) AS x1, materialize(0) AS x2, materialize(0) AS x3, materialize(0) AS x4, materialize(0) AS x5, materialize(0) AS x6, materialize(0) AS x7, materialize(0) AS x8, materialize(0) AS x9, materialize(0) AS x10 FROM numbers(40000000)) + WHERE NOT ignore(or(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)) + SELECT count() FROM + (SELECT materialize(1) AS x1, materialize(1) AS x2, materialize(1) AS x3, materialize(1) AS x4, materialize(1) AS x5, materialize(1) AS x6, materialize(1) AS x7, materialize(1) AS x8, materialize(1) AS x9, materialize(1) AS x10 FROM numbers(200000000)) + WHERE NOT ignore(or(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)) + SELECT count() FROM + (SELECT materialize(1) AS x1, materialize(1) AS x2, materialize(1) AS x3, materialize(1) AS x4, materialize(1) AS x5, materialize(1) AS x6, materialize(1) AS x7, materialize(1) AS x8, materialize(1) AS x9, materialize(1) AS x10 FROM numbers(500000000)) + WHERE NOT ignore(xor(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)) + + SELECT count() FROM + (SELECT materialize(toUInt8(1)) AS x1, materialize(toUInt16(1)) AS x2, materialize(toUInt32(1)) AS x3, materialize(toUInt64(1)) AS x4, materialize(toInt8(1)) AS x5, materialize(toInt16(1)) AS x6, materialize(toInt32(1)) AS x7, materialize(toInt64(1)) AS x8, materialize(toFloat32(1)) AS x9, materialize(toFloat64(1)) AS x10 FROM numbers(20000000)) + WHERE NOT ignore(and(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)) + SELECT count() FROM + (SELECT materialize(toUInt8(0)) AS x1, materialize(toUInt16(0)) AS x2, materialize(toUInt32(0)) AS x3, materialize(toUInt64(0)) AS x4, materialize(toInt8(0)) AS x5, materialize(toInt16(0)) AS x6, materialize(toInt32(0)) AS x7, materialize(toInt64(0)) AS x8, materialize(toFloat32(0)) AS x9, materialize(toFloat64(0)) AS x10 FROM numbers(40000000)) + WHERE NOT ignore(and(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)) + SELECT count() FROM + (SELECT materialize(toUInt8(0)) AS x1, materialize(toUInt16(0)) AS x2, materialize(toUInt32(0)) AS x3, materialize(toUInt64(0)) AS x4, materialize(toInt8(0)) AS x5, materialize(toInt16(0)) AS x6, materialize(toInt32(0)) AS x7, materialize(toInt64(0)) AS x8, materialize(toFloat32(0)) AS x9, materialize(toFloat64(0)) AS x10 FROM numbers(20000000)) + WHERE NOT ignore(or(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)) + SELECT count() FROM + (SELECT materialize(toUInt8(1)) AS x1, materialize(toUInt16(1)) AS x2, materialize(toUInt32(1)) AS x3, materialize(toUInt64(1)) AS x4, materialize(toInt8(1)) AS x5, materialize(toInt16(1)) AS x6, materialize(toInt32(1)) AS x7, materialize(toInt64(1)) AS x8, materialize(toFloat32(1)) AS x9, materialize(toFloat64(1)) AS x10 FROM numbers(40000000)) + WHERE NOT ignore(or(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)) + SELECT count() FROM + (SELECT materialize(toUInt8(1)) AS x1, materialize(toUInt16(1)) AS x2, materialize(toUInt32(1)) AS x3, materialize(toUInt64(1)) AS x4, materialize(toInt8(1)) AS x5, materialize(toInt16(1)) AS x6, materialize(toInt32(1)) AS x7, materialize(toInt64(1)) AS x8, materialize(toFloat32(1)) AS x9, materialize(toFloat64(1)) AS x10 FROM numbers(50000000)) + WHERE NOT ignore(xor(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)) + \ No newline at end of file diff --git a/dbms/tests/performance/logical_functions_medium.xml b/dbms/tests/performance/logical_functions_medium.xml new file mode 100644 index 00000000000..daf11737aa4 --- /dev/null +++ b/dbms/tests/performance/logical_functions_medium.xml @@ -0,0 +1,59 @@ + + 1 + loop + + + + 60 + 30000 + + + 120 + 60000 + + + + + 1 + + + SELECT count() FROM (SELECT materialize(1) AS x1, materialize(1) AS x2, materialize(1) AS x3 FROM numbers(200000000)) WHERE NOT ignore(and(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(0) AS x1, materialize(0) AS x2, materialize(0) AS x3 FROM numbers(400000000)) WHERE NOT ignore(and(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(0) AS x1, materialize(0) AS x2, materialize(0) AS x3 FROM numbers(200000000)) WHERE NOT ignore(or(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(1) AS x1, materialize(1) AS x2, materialize(1) AS x3 FROM numbers(200000000)) WHERE NOT ignore(or(x1,x2,x3)) + + + SELECT count() FROM (SELECT materialize(1) AS x1, materialize(toUInt32(1)) AS x2, materialize(toUInt64(1)) AS x3 FROM numbers(100000000)) WHERE NOT ignore(and(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(0) AS x1, materialize(toUInt32(0)) AS x2, materialize(toUInt64(0)) AS x3 FROM numbers(200000000)) WHERE NOT ignore(and(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(0) AS x1, materialize(toUInt32(0)) AS x2, materialize(toUInt64(0)) AS x3 FROM numbers(100000000)) WHERE NOT ignore(or(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(1) AS x1, materialize(toUInt32(1)) AS x2, materialize(toUInt64(1)) AS x3 FROM numbers(200000000)) WHERE NOT ignore(or(x1,x2,x3)) + + SELECT count() FROM (SELECT materialize(toNullable(1)) AS x1, materialize(toNullable(1)) AS x2, materialize(toNullable(1)) AS x3 FROM numbers(30000000)) WHERE NOT ignore(and(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(toNullable(0)) AS x1, materialize(toNullable(0)) AS x2, materialize(toNullable(0)) AS x3 FROM numbers(100000000)) WHERE NOT ignore(and(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(toNullable(0)) AS x1, materialize(toNullable(0)) AS x2, materialize(toNullable(0)) AS x3 FROM numbers(50000000)) WHERE NOT ignore(or(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(toNullable(1)) AS x1, materialize(toNullable(1)) AS x2, materialize(toNullable(1)) AS x3 FROM numbers(100000000)) WHERE NOT ignore(or(x1,x2,x3)) + + SELECT count() FROM (SELECT materialize(toNullable(toUInt16(1))) AS x1, materialize(toNullable(toUInt32(1))) AS x2, materialize(toNullable(toUInt64(1))) AS x3 FROM numbers(30000000)) WHERE NOT ignore(and(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(toNullable(toUInt16(0))) AS x1, materialize(toNullable(toUInt32(0))) AS x2, materialize(toNullable(toUInt64(0))) AS x3 FROM numbers(100000000)) WHERE NOT ignore(and(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(toNullable(toUInt16(0))) AS x1, materialize(toNullable(toUInt32(0))) AS x2, materialize(toNullable(toUInt64(0))) AS x3 FROM numbers(50000000)) WHERE NOT ignore(or(x1,x2,x3)) + SELECT count() FROM (SELECT materialize(toNullable(toUInt16(1))) AS x1, materialize(toNullable(toUInt32(1))) AS x2, materialize(toNullable(toUInt64(1))) AS x3 FROM numbers(100000000)) WHERE NOT ignore(or(x1,x2,x3)) + + + CREATE DATABASE IF NOT EXISTS test_logical_functions + + CREATE TABLE test_logical_functions._4_1_UInt8 (x1 UInt8, x2 UInt8, x3 UInt8, x4 UInt8) ENGINE = Memory + CREATE TABLE test_logical_functions._4_1_Mixed (x1 UInt16, x2 UInt32, x3 UInt64, x4 UInt8) ENGINE = Memory + CREATE TABLE test_logical_functions._4_1_Nullable_UInt8 (x1 Nullable(UInt8), x2 Nullable(UInt8), x3 Nullable(UInt8), x4 Nullable(UInt8)) ENGINE = Memory + CREATE TABLE test_logical_functions._4_1_Nullable_Mixed (x1 Nullable(UInt16), x2 Nullable(UInt32), x3 Nullable(UInt64), x4 Nullable(Float64)) ENGINE = Memory + INSERT INTO test_logical_functions._4_1_UInt8 SELECT materialize(1), materialize(1), materialize(1), materialize(1) FROM numbers(500000000) + INSERT INTO test_logical_functions._4_1_Mixed SELECT materialize(1), materialize(1), materialize(1), materialize(1) FROM numbers(200000000) + INSERT INTO test_logical_functions._4_1_Nullable_UInt8 SELECT materialize(1), materialize(1), materialize(1), materialize(1) FROM numbers(200000000) + INSERT INTO test_logical_functions._4_1_Nullable_Mixed SELECT materialize(1), materialize(1), materialize(1), materialize(1.0) FROM numbers(100000000) + + SELECT count() FROM test_logical_functions._4_1_UInt8 WHERE NOT ignore(xor(x1,x2,x3,x4)) + SELECT count() FROM test_logical_functions._4_1_Mixed WHERE NOT ignore(xor(x1,x2,x3,x4)) + SELECT count() FROM test_logical_functions._4_1_Nullable_UInt8 WHERE NOT ignore(xor(x1,x2,x3,x4)) + SELECT count() FROM test_logical_functions._4_1_Nullable_Mixed WHERE NOT ignore(xor(x1,x2,x3,x4)) + + DROP DATABASE test_logical_functions +