mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #9446 from ClickHouse/akz/preformance_tests_for_logical_functions
Comprehensive performance tests for logical functions
This commit is contained in:
commit
2fc799c1c1
@ -12,6 +12,10 @@
|
||||
</any_of>
|
||||
</stop_conditions>
|
||||
|
||||
<settings>
|
||||
<max_threads>1</max_threads>
|
||||
</settings>
|
||||
|
||||
<!-- 100 AND operands -->
|
||||
<query>select count() from numbers(10000000) where number != 96594 AND number != 18511 AND number != 98085 AND number != 84177 AND number != 70314 AND number != 28083 AND number != 54202 AND number != 66522 AND number != 66939 AND number != 99469 AND number != 65776 AND number != 22876 AND number != 42151 AND number != 19924 AND number != 66681 AND number != 63022 AND number != 17487 AND number != 83914 AND number != 59754 AND number != 968 AND number != 73334 AND number != 68569 AND number != 49853 AND number != 33155 AND number != 31777 AND number != 99698 AND number != 26708 AND number != 76409 AND number != 42191 AND number != 55397 AND number != 25724 AND number != 39170 AND number != 22728 AND number != 98238 AND number != 86052 AND number != 12756 AND number != 13948 AND number != 57774 AND number != 82511 AND number != 11337 AND number != 23506 AND number != 11875 AND number != 58536 AND number != 56919 AND number != 25986 AND number != 80710 AND number != 61797 AND number != 99244 AND number != 11665 AND number != 15758 AND number != 82899 AND number != 63150 AND number != 7198 AND number != 40071 AND number != 46310 AND number != 78488 AND number != 9273 AND number != 91878 AND number != 57904 AND number != 53941 AND number != 75675 AND number != 12093 AND number != 50090 AND number != 59675 AND number != 41632 AND number != 81448 AND number != 46821 AND number != 51919 AND number != 49028 AND number != 71059 AND number != 15673 AND number != 6132 AND number != 15473 AND number != 32527 AND number != 63842 AND number != 33121 AND number != 53271 AND number != 86033 AND number != 96807 AND number != 4791 AND number != 80089 AND number != 51616 AND number != 46311 AND number != 82844 AND number != 59353 AND number != 63538 AND number != 64857 AND number != 58471 AND number != 29870 AND number != 80209 AND number != 61000 AND number != 75991 AND number != 44506 AND number != 11283 AND number != 6335 AND number != 73502 AND number != 22354 AND number != 72816 AND number != 66399 AND number != 61703</query>
|
||||
<!-- 10 AND operands -->
|
||||
|
51
dbms/tests/performance/logical_functions_large.xml
Normal file
51
dbms/tests/performance/logical_functions_large.xml
Normal file
@ -0,0 +1,51 @@
|
||||
<test>
|
||||
<times_to_run>1</times_to_run>
|
||||
<type>loop</type>
|
||||
|
||||
<stop_conditions>
|
||||
<all_of>
|
||||
<iterations>60</iterations>
|
||||
<min_time_not_changing_for_ms>30000</min_time_not_changing_for_ms>
|
||||
</all_of>
|
||||
<any_of>
|
||||
<iterations>120</iterations>
|
||||
<total_time_ms>60000</total_time_ms>
|
||||
</any_of>
|
||||
</stop_conditions>
|
||||
|
||||
<settings>
|
||||
<max_threads>1</max_threads>
|
||||
</settings>
|
||||
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
</test>
|
59
dbms/tests/performance/logical_functions_medium.xml
Normal file
59
dbms/tests/performance/logical_functions_medium.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<test>
|
||||
<times_to_run>1</times_to_run>
|
||||
<type>loop</type>
|
||||
|
||||
<stop_conditions>
|
||||
<all_of>
|
||||
<iterations>60</iterations>
|
||||
<min_time_not_changing_for_ms>30000</min_time_not_changing_for_ms>
|
||||
</all_of>
|
||||
<any_of>
|
||||
<iterations>120</iterations>
|
||||
<total_time_ms>60000</total_time_ms>
|
||||
</any_of>
|
||||
</stop_conditions>
|
||||
|
||||
<settings>
|
||||
<max_threads>1</max_threads>
|
||||
</settings>
|
||||
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
|
||||
<!-- Check with bigger types -->
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
<query>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))</query>
|
||||
|
||||
<!-- We have to check the high performing XOR function against in-memory data to avoid the overhead of data generating code -->
|
||||
<create_query>CREATE DATABASE IF NOT EXISTS test_logical_functions</create_query>
|
||||
|
||||
<create_query>CREATE TABLE test_logical_functions._4_1_UInt8 (x1 UInt8, x2 UInt8, x3 UInt8, x4 UInt8) ENGINE = Memory</create_query>
|
||||
<create_query>CREATE TABLE test_logical_functions._4_1_Mixed (x1 UInt16, x2 UInt32, x3 UInt64, x4 UInt8) ENGINE = Memory</create_query>
|
||||
<create_query>CREATE TABLE test_logical_functions._4_1_Nullable_UInt8 (x1 Nullable(UInt8), x2 Nullable(UInt8), x3 Nullable(UInt8), x4 Nullable(UInt8)) ENGINE = Memory</create_query>
|
||||
<create_query>CREATE TABLE test_logical_functions._4_1_Nullable_Mixed (x1 Nullable(UInt16), x2 Nullable(UInt32), x3 Nullable(UInt64), x4 Nullable(Float64)) ENGINE = Memory</create_query>
|
||||
<fill_query>INSERT INTO test_logical_functions._4_1_UInt8 SELECT materialize(1), materialize(1), materialize(1), materialize(1) FROM numbers(500000000)</fill_query>
|
||||
<fill_query>INSERT INTO test_logical_functions._4_1_Mixed SELECT materialize(1), materialize(1), materialize(1), materialize(1) FROM numbers(200000000)</fill_query>
|
||||
<fill_query>INSERT INTO test_logical_functions._4_1_Nullable_UInt8 SELECT materialize(1), materialize(1), materialize(1), materialize(1) FROM numbers(200000000)</fill_query>
|
||||
<fill_query>INSERT INTO test_logical_functions._4_1_Nullable_Mixed SELECT materialize(1), materialize(1), materialize(1), materialize(1.0) FROM numbers(100000000)</fill_query>
|
||||
|
||||
<query>SELECT count() FROM test_logical_functions._4_1_UInt8 WHERE NOT ignore(xor(x1,x2,x3,x4))</query>
|
||||
<query>SELECT count() FROM test_logical_functions._4_1_Mixed WHERE NOT ignore(xor(x1,x2,x3,x4))</query>
|
||||
<query>SELECT count() FROM test_logical_functions._4_1_Nullable_UInt8 WHERE NOT ignore(xor(x1,x2,x3,x4))</query>
|
||||
<query>SELECT count() FROM test_logical_functions._4_1_Nullable_Mixed WHERE NOT ignore(xor(x1,x2,x3,x4))</query>
|
||||
|
||||
<drop_query>DROP DATABASE test_logical_functions</drop_query>
|
||||
</test>
|
56
dbms/tests/performance/logical_functions_small.xml
Normal file
56
dbms/tests/performance/logical_functions_small.xml
Normal file
@ -0,0 +1,56 @@
|
||||
<test>
|
||||
<times_to_run>1</times_to_run>
|
||||
<type>loop</type>
|
||||
|
||||
<stop_conditions>
|
||||
<all_of>
|
||||
<iterations>15</iterations>
|
||||
<min_time_not_changing_for_ms>20000</min_time_not_changing_for_ms>
|
||||
</all_of>
|
||||
<any_of>
|
||||
<iterations>120</iterations>
|
||||
<total_time_ms>60000</total_time_ms>
|
||||
</any_of>
|
||||
</stop_conditions>
|
||||
|
||||
<settings>
|
||||
<max_threads>1</max_threads>
|
||||
</settings>
|
||||
|
||||
<!-- We have to use Memory table engine for very fast operations (to avoid the slow code that materializes the data),
|
||||
so that the weight of their execution time keeps high and performance test results make sense
|
||||
-->
|
||||
<create_query>CREATE DATABASE IF NOT EXISTS test_logical_functions</create_query>
|
||||
|
||||
<create_query>CREATE TABLE test_logical_functions._2_0_UInt8 (x1 UInt8, x2 UInt8) ENGINE = Memory</create_query>
|
||||
<create_query>CREATE TABLE test_logical_functions._2_1_UInt8 (x1 UInt8, x2 UInt8) ENGINE = Memory</create_query>
|
||||
|
||||
<fill_query>INSERT INTO test_logical_functions._2_0_UInt8 SELECT materialize(0) AS x1, materialize(0) AS x2 FROM numbers(2000000000)</fill_query>
|
||||
<fill_query>INSERT INTO test_logical_functions._2_1_UInt8 SELECT materialize(1) AS x1, materialize(1) AS x2 FROM numbers(2000000000)</fill_query>
|
||||
|
||||
<query>SELECT count() FROM test_logical_functions._2_1_UInt8 WHERE NOT ignore(and(x1,x2))</query>
|
||||
<query>SELECT count() FROM test_logical_functions._2_0_UInt8 WHERE NOT ignore(and(x1,x2))</query>
|
||||
<query>SELECT count() FROM test_logical_functions._2_0_UInt8 WHERE NOT ignore(or(x1,x2))</query>
|
||||
<query>SELECT count() FROM test_logical_functions._2_1_UInt8 WHERE NOT ignore(or(x1,x2))</query>
|
||||
<query>SELECT count() FROM test_logical_functions._2_1_UInt8 WHERE NOT ignore(xor(x1,x2))</query>
|
||||
|
||||
<query>SELECT count() FROM (SELECT toNullable(materialize(1)) AS x1, toNullable(materialize(1)) AS x2 FROM numbers(50000000)) WHERE NOT ignore(and(x1,x2))</query>
|
||||
<query>SELECT count() FROM (SELECT toNullable(materialize(0)) AS x1, toNullable(materialize(0)) AS x2 FROM numbers(50000000)) WHERE NOT ignore(and(x1,x2))</query>
|
||||
<query>SELECT count() FROM (SELECT toNullable(materialize(0)) AS x1, toNullable(materialize(0)) AS x2 FROM numbers(50000000)) WHERE NOT ignore(or(x1,x2))</query>
|
||||
<query>SELECT count() FROM (SELECT toNullable(materialize(1)) AS x1, toNullable(materialize(1)) AS x2 FROM numbers(50000000)) WHERE NOT ignore(or(x1,x2))</query>
|
||||
<query>SELECT count() FROM (SELECT toNullable(materialize(1)) AS x1, toNullable(materialize(1)) AS x2 FROM numbers(200000000)) WHERE NOT ignore(xor(x1,x2))</query>
|
||||
|
||||
<!-- Check with bigger types: UInt16, UInt32, UInt64, Float64 -->
|
||||
<query>SELECT count() FROM (SELECT materialize(toUInt16(1)) AS x1, materialize(toUInt32(1)) AS x2 FROM numbers(200000000)) WHERE NOT ignore(and(x1,x2))</query>
|
||||
<query>SELECT count() FROM (SELECT materialize(toUInt32(1)) AS x1, materialize(toUInt64(1)) AS x2 FROM numbers(200000000)) WHERE NOT ignore(and(x1,x2))</query>
|
||||
<query>SELECT count() FROM (SELECT materialize(toUInt64(1)) AS x1, materialize(0.1) AS x2 FROM numbers(200000000)) WHERE NOT ignore(and(x1,x2))</query>
|
||||
<query>SELECT count() FROM (SELECT materialize(toUInt16(1)) AS x1, materialize(toUInt32(1)) AS x2 FROM numbers(200000000)) WHERE NOT ignore(or(x1,x2))</query>
|
||||
<query>SELECT count() FROM (SELECT materialize(toUInt32(1)) AS x1, materialize(toUInt64(1)) AS x2 FROM numbers(200000000)) WHERE NOT ignore(or(x1,x2))</query>
|
||||
<query>SELECT count() FROM (SELECT materialize(toUInt64(1)) AS x1, materialize(0.1) AS x2 FROM numbers(200000000)) WHERE NOT ignore(or(x1,x2))</query>
|
||||
<query>SELECT count() FROM (SELECT materialize(toUInt64(1)) AS x1, materialize(toUInt64(1)) AS x2 FROM numbers(200000000)) WHERE NOT ignore(xor(x1,x2))</query>
|
||||
|
||||
<drop_query>DROP TABLE test_logical_functions._2_0_UInt8</drop_query>
|
||||
<drop_query>DROP TABLE test_logical_functions._2_1_UInt8</drop_query>
|
||||
|
||||
<drop_query>DROP DATABASE test_logical_functions</drop_query>
|
||||
</test>
|
Loading…
Reference in New Issue
Block a user