Updated benchmarks

This commit is contained in:
Maksim Kita 2021-03-28 13:35:26 +03:00
parent 4f298d54b9
commit 2e55d47bab
3 changed files with 48 additions and 29 deletions

View File

@ -1,6 +1,6 @@
<test max_ignored_relative_change="0.3">
<create_query>
CREATE TABLE simple_key_source_table
CREATE TABLE simple_key_direct_dictionary_source_table
(
id UInt64,
value_int UInt64,
@ -11,7 +11,7 @@
</create_query>
<create_query>
CREATE TABLE complex_key_source_table
CREATE TABLE complex_key_direct_dictionary_source_table
(
id UInt64,
id_key String,
@ -32,7 +32,7 @@
value_string_nullable Nullable(String)
)
PRIMARY KEY id
SOURCE(CLICKHOUSE(DB 'default' TABLE 'simple_key_source_table'))
SOURCE(CLICKHOUSE(DB 'default' TABLE 'simple_key_direct_dictionary_source_table'))
LAYOUT(DIRECT())
</create_query>
@ -47,35 +47,35 @@
value_string_nullable Nullable(String)
)
PRIMARY KEY id, id_key
SOURCE(CLICKHOUSE(DB 'default' TABLE 'complex_key_source_table'))
SOURCE(CLICKHOUSE(DB 'default' TABLE 'complex_key_direct_dictionary_source_table'))
LAYOUT(COMPLEX_KEY_DIRECT())
</create_query>
<fill_query>
INSERT INTO simple_key_source_table
INSERT INTO simple_key_direct_dictionary_source_table
SELECT number, number, toString(number), toDecimal64(number, 8), toString(number)
FROM system.numbers
LIMIT 100000;
</fill_query>
<fill_query>
INSERT INTO complex_key_source_table
INSERT INTO complex_key_direct_dictionary_source_table
SELECT number, toString(number), number, toString(number), toDecimal64(number, 8), toString(number)
FROM system.numbers
LIMIT 100000;
</fill_query>
<query>SELECT dictGet('default.simple_key_source_table', 'value_int', number) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictGet('default.simple_key_source_table', 'value_string', number) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictGet('default.simple_key_source_table', 'value_decimal', number) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictGet('default.simple_key_source_table', 'value_string_nullable', number) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictHas('default.simple_key_source_table', number) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictGet('default.simple_key_direct_dictionary', 'value_int', number) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictGet('default.simple_key_direct_dictionary', 'value_string', number) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictGet('default.simple_key_direct_dictionary', 'value_decimal', number) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictGet('default.simple_key_direct_dictionary', 'value_string_nullable', number) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictHas('default.simple_key_direct_dictionary', number) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictGet('default.simple_key_source_table', 'value_int', number) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictGet('default.simple_key_source_table', 'value_string', number) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictGet('default.simple_key_source_table', 'value_decimal', number) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictGet('default.simple_key_source_table', 'value_string_nullable', number) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictHas('default.simple_key_source_table', number) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictGet('default.simple_key_direct_dictionary', 'value_int', number) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictGet('default.simple_key_direct_dictionary', 'value_string', number) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictGet('default.simple_key_direct_dictionary', 'value_decimal', number) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictGet('default.simple_key_direct_dictionary', 'value_string_nullable', number) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictHas('default.simple_key_direct_dictionary', number) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictGet('default.complex_key_direct_dictionary', 'value_int', (number, toString(number))) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictGet('default.complex_key_direct_dictionary', 'value_string', (number, toString(number))) FROM system.numbers LIMIT 75000;</query>
@ -89,4 +89,10 @@
<query>SELECT dictGet('default.complex_key_direct_dictionary', 'value_string_nullable', (number, toString(number))) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictHas('default.complex_key_direct_dictionary', (number, toString(number))) FROM system.numbers LIMIT 150000;</query>
<drop_query>DROP TABLE IF EXISTS simple_key_direct_dictionary_source_table;</drop_query>
<drop_query>DROP TABLE IF EXISTS complex_key_direct_dictionary_source_table;</drop_query>
<drop_query>DROP DICTIONARY IF EXISTS simple_key_direct_dictionary;</drop_query>
<drop_query>DROP DICTIONARY IF EXISTS complex_key_direct_dictionary;</drop_query>
</test>

View File

@ -1,6 +1,6 @@
<test max_ignored_relative_change="0.3">
<create_query>
CREATE TABLE simple_key_source_table
CREATE TABLE simple_key_flat_dictionary_source_table
(
id UInt64,
value_int UInt64,
@ -20,12 +20,13 @@
value_string_nullable Nullable(String)
)
PRIMARY KEY id
SOURCE(CLICKHOUSE(DB 'default' TABLE 'simple_key_source_table'))
SOURCE(CLICKHOUSE(DB 'default' TABLE 'simple_key_flat_dictionary_source_table'))
LAYOUT(FLAT())
LIFETIME(MIN 0 MAX 1000)
</create_query>
<fill_query>
INSERT INTO simple_key_source_table
INSERT INTO simple_key_flat_dictionary_source_table
SELECT number, number, toString(number), toDecimal64(number, 8), toString(number)
FROM system.numbers
LIMIT 100000;
@ -43,4 +44,8 @@
<query>SELECT dictGet('default.simple_key_flat_dictionary', 'value_string_nullable', number) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictHas('default.simple_key_flat_dictionary', number) FROM system.numbers LIMIT 150000;</query>
<drop_query>DROP TABLE IF EXISTS simple_key_flat_dictionary_source_table</drop_query>
<drop_query>DROP DICTIONARY IF EXISTS simple_key_flat_dictionary</drop_query>
</test>

View File

@ -1,6 +1,6 @@
<test max_ignored_relative_change="0.3">
<create_query>
CREATE TABLE simple_key_source_table
CREATE TABLE simple_key_hashed_dictionary_source_table
(
id UInt64,
value_int UInt64,
@ -11,7 +11,7 @@
</create_query>
<create_query>
CREATE TABLE complex_key_source_table
CREATE TABLE complex_key_hashed_dictionary_source_table
(
id UInt64,
id_key String,
@ -19,7 +19,7 @@
value_string String,
value_decimal Decimal64(8),
value_string_nullable Nullable(String)
) ENGINE = MEMORY;
) ENGINE = Memory;
</create_query>
<create_query>
@ -32,8 +32,9 @@
value_string_nullable Nullable(String)
)
PRIMARY KEY id
SOURCE(CLICKHOUSE(DB 'default' TABLE 'simple_key_source_table'))
LAYOUT(DIRECT())
SOURCE(CLICKHOUSE(DB 'default' TABLE 'simple_key_hashed_dictionary_source_table'))
LAYOUT(HASHED())
LIFETIME(MIN 0 MAX 1000);
</create_query>
<create_query>
@ -47,23 +48,24 @@
value_string_nullable Nullable(String)
)
PRIMARY KEY id, id_key
SOURCE(CLICKHOUSE(DB 'default' TABLE 'complex_key_source_table'))
LAYOUT(COMPLEX_KEY_DIRECT())
SOURCE(CLICKHOUSE(DB 'default' TABLE 'complex_key_hashed_dictionary_source_table'))
LAYOUT(COMPLEX_KEY_HASHED())
LIFETIME(MIN 0 MAX 1000);
</create_query>
<fill_query>
INSERT INTO simple_key_source_table
INSERT INTO simple_key_hashed_dictionary_source_table
SELECT number, number, toString(number), toDecimal64(number, 8), toString(number)
FROM system.numbers
LIMIT 100000;
</fill_query>
<fill_query>
INSERT INTO complex_key_source_table
INSERT INTO complex_key_hashed_dictionary_source_table
SELECT number, toString(number), number, toString(number), toDecimal64(number, 8), toString(number)
FROM system.numbers
LIMIT 100000;
</create_query>z
</fill_query>
<query>SELECT dictGet('default.simple_key_hashed_dictionary', 'value_int', number) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictGet('default.simple_key_hashed_dictionary', 'value_string', number) FROM system.numbers LIMIT 75000;</query>
@ -89,4 +91,10 @@
<query>SELECT dictGet('default.complex_key_hashed_dictionary', 'value_string_nullable', (number, toString(number))) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictHas('default.complex_key_hashed_dictionary', (number, toString(number))) FROM system.numbers LIMIT 150000;</query>
<drop_query>DROP TABLE IF EXISTS simple_key_hashed_dictionary_source_table;</drop_query>
<drop_query>DROP TABLE IF EXISTS complex_key_hashed_dictionary_source_table;</drop_query>
<drop_query>DROP DICTIONARY IF EXISTS simple_key_hashed_dictionary;</drop_query>
<drop_query>DROP DICTIONARY IF EXISTS complex_key_hashed_dictionary;</drop_query>
</test>