diff --git a/dbms/tests/performance/logical_functions_small.xml b/dbms/tests/performance/logical_functions_small.xml new file mode 100644 index 00000000000..13dc0aa7849 --- /dev/null +++ b/dbms/tests/performance/logical_functions_small.xml @@ -0,0 +1,57 @@ + + 1 + loop + + + + 15 + 20000 + + + 120 + 60000 + + + + + 1 + + + CREATE DATABASE IF NOT EXISTS test_logical_functions + + + + CREATE TABLE test_logical_functions._2_0_UInt8 (x1 UInt8, x2 UInt8) ENGINE = Memory + CREATE TABLE test_logical_functions._2_1_UInt8 (x1 UInt8, x2 UInt8) ENGINE = Memory + + INSERT INTO test_logical_functions._2_0_UInt8 SELECT materialize(0) AS x1, materialize(0) AS x2 FROM numbers(2000000000) + INSERT INTO test_logical_functions._2_1_UInt8 SELECT materialize(1) AS x1, materialize(1) AS x2 FROM numbers(2000000000) + + SELECT count() FROM test_logical_functions._2_1_UInt8 WHERE NOT ignore(and(x1,x2)) + SELECT count() FROM test_logical_functions._2_0_UInt8 WHERE NOT ignore(and(x1,x2)) + SELECT count() FROM test_logical_functions._2_0_UInt8 WHERE NOT ignore(or(x1,x2)) + SELECT count() FROM test_logical_functions._2_1_UInt8 WHERE NOT ignore(or(x1,x2)) + SELECT count() FROM test_logical_functions._2_1_UInt8 WHERE NOT ignore(xor(x1,x2)) + + SELECT count() FROM (SELECT toNullable(materialize(1)) AS x1, toNullable(materialize(1)) AS x2 FROM numbers(50000000)) WHERE NOT ignore(and(x1,x2)) + SELECT count() FROM (SELECT toNullable(materialize(0)) AS x1, toNullable(materialize(0)) AS x2 FROM numbers(50000000)) WHERE NOT ignore(and(x1,x2)) + SELECT count() FROM (SELECT toNullable(materialize(0)) AS x1, toNullable(materialize(0)) AS x2 FROM numbers(50000000)) WHERE NOT ignore(or(x1,x2)) + SELECT count() FROM (SELECT toNullable(materialize(1)) AS x1, toNullable(materialize(1)) AS x2 FROM numbers(50000000)) WHERE NOT ignore(or(x1,x2)) + SELECT count() FROM (SELECT toNullable(materialize(1)) AS x1, toNullable(materialize(1)) AS x2 FROM numbers(200000000)) WHERE NOT ignore(xor(x1,x2)) + + + SELECT count() FROM (SELECT materialize(256) AS x1, materialize(65536) AS x2 FROM numbers(200000000)) WHERE NOT ignore(and(x1,x2)) + SELECT count() FROM (SELECT materialize(65536) AS x1, materialize(4294967296) AS x2 FROM numbers(200000000)) WHERE NOT ignore(and(x1,x2)) + SELECT count() FROM (SELECT materialize(4294967296) AS x1, materialize(0.1) AS x2 FROM numbers(200000000)) WHERE NOT ignore(and(x1,x2)) + SELECT count() FROM (SELECT materialize(256) AS x1, materialize(65536) AS x2 FROM numbers(200000000)) WHERE NOT ignore(or(x1,x2)) + SELECT count() FROM (SELECT materialize(65536) AS x1, materialize(4294967296) AS x2 FROM numbers(200000000)) WHERE NOT ignore(or(x1,x2)) + SELECT count() FROM (SELECT materialize(4294967296) AS x1, materialize(0.1) AS x2 FROM numbers(200000000)) WHERE NOT ignore(or(x1,x2)) + SELECT count() FROM (SELECT materialize(4294967296) AS x1, materialize(4294967296) AS x2 FROM numbers(200000000)) WHERE NOT ignore(xor(x1,x2)) + + DROP TABLE test_logical_functions._2_0_UInt8 + DROP TABLE test_logical_functions._2_1_UInt8 + + DROP DATABASE test_logical_functions + \ No newline at end of file