ClickHouse/tests/performance/direct_dictionary.xml

99 lines
5.2 KiB
XML
Raw Normal View History

2021-03-25 22:00:06 +00:00
<test max_ignored_relative_change="0.3">
2021-03-08 18:51:24 +00:00
<create_query>
2021-03-28 10:35:26 +00:00
CREATE TABLE simple_key_direct_dictionary_source_table
2021-03-08 18:51:24 +00:00
(
id UInt64,
value_int UInt64,
value_string String,
value_decimal Decimal64(8),
value_string_nullable Nullable(String)
2021-03-27 14:00:00 +00:00
) ENGINE = Memory;
2021-03-08 18:51:24 +00:00
</create_query>
<create_query>
2021-03-28 10:35:26 +00:00
CREATE TABLE complex_key_direct_dictionary_source_table
2021-03-08 18:51:24 +00:00
(
id UInt64,
2021-03-27 14:00:00 +00:00
id_key String,
2021-03-08 18:51:24 +00:00
value_int UInt64,
value_string String,
value_decimal Decimal64(8),
value_string_nullable Nullable(String)
2021-03-27 14:00:00 +00:00
) ENGINE = TinyLog;
2021-03-08 18:51:24 +00:00
</create_query>
<create_query>
2021-03-27 14:00:00 +00:00
CREATE DICTIONARY simple_key_direct_dictionary
2021-03-08 18:51:24 +00:00
(
id UInt64,
value_int UInt64,
value_string String,
value_decimal Decimal64(8),
value_string_nullable Nullable(String)
2021-03-27 14:00:00 +00:00
)
PRIMARY KEY id
2021-03-28 10:35:26 +00:00
SOURCE(CLICKHOUSE(DB 'default' TABLE 'simple_key_direct_dictionary_source_table'))
2021-03-27 14:00:00 +00:00
LAYOUT(DIRECT())
2021-03-08 18:51:24 +00:00
</create_query>
<create_query>
2021-03-27 14:00:00 +00:00
CREATE DICTIONARY complex_key_direct_dictionary
2021-03-08 18:51:24 +00:00
(
id UInt64,
id_key String,
value_int UInt64,
value_string String,
value_decimal Decimal64(8),
value_string_nullable Nullable(String)
)
PRIMARY KEY id, id_key
2021-03-28 10:35:26 +00:00
SOURCE(CLICKHOUSE(DB 'default' TABLE 'complex_key_direct_dictionary_source_table'))
2021-03-08 18:51:24 +00:00
LAYOUT(COMPLEX_KEY_DIRECT())
</create_query>
2021-03-27 14:00:00 +00:00
<fill_query>
2021-03-28 10:35:26 +00:00
INSERT INTO simple_key_direct_dictionary_source_table
2021-03-27 14:00:00 +00:00
SELECT number, number, toString(number), toDecimal64(number, 8), toString(number)
FROM system.numbers
LIMIT 100000;
</fill_query>
<fill_query>
2021-03-28 10:35:26 +00:00
INSERT INTO complex_key_direct_dictionary_source_table
2021-03-27 14:00:00 +00:00
SELECT number, toString(number), number, toString(number), toDecimal64(number, 8), toString(number)
FROM system.numbers
LIMIT 100000;
</fill_query>
2021-03-28 10:35:26 +00:00
<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>
2021-03-27 14:00:00 +00:00
2021-03-28 10:35:26 +00:00
<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>
2021-03-27 14:00:00 +00:00
<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>
<query>SELECT dictGet('default.complex_key_direct_dictionary', 'value_decimal', (number, toString(number))) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictGet('default.complex_key_direct_dictionary', 'value_string_nullable', (number, toString(number))) FROM system.numbers LIMIT 75000;</query>
<query>SELECT dictHas('default.complex_key_direct_dictionary', (number, toString(number))) FROM system.numbers LIMIT 75000;</query>
2021-03-08 18:51:24 +00:00
2021-03-27 14:00:00 +00:00
<query>SELECT dictGet('default.complex_key_direct_dictionary', 'value_int', (number, toString(number))) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictGet('default.complex_key_direct_dictionary', 'value_string', (number, toString(number))) FROM system.numbers LIMIT 150000;</query>
<query>SELECT dictGet('default.complex_key_direct_dictionary', 'value_decimal', (number, toString(number))) FROM system.numbers LIMIT 150000;</query>
<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>
2021-03-08 18:51:24 +00:00
2021-03-28 10:35:26 +00:00
<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>
2021-03-08 18:51:24 +00:00
</test>