2021-03-27 14:00:00 +00:00
|
|
|
<test max_ignored_relative_change="0.3">
|
|
|
|
<create_query>
|
2021-03-28 10:35:26 +00:00
|
|
|
CREATE TABLE simple_key_flat_dictionary_source_table
|
2021-03-27 14:00:00 +00:00
|
|
|
(
|
|
|
|
id UInt64,
|
|
|
|
value_int UInt64,
|
|
|
|
value_string String,
|
|
|
|
value_decimal Decimal64(8),
|
|
|
|
value_string_nullable Nullable(String)
|
|
|
|
) ENGINE = Memory;
|
|
|
|
</create_query>
|
|
|
|
|
|
|
|
<create_query>
|
|
|
|
CREATE DICTIONARY simple_key_flat_dictionary
|
|
|
|
(
|
|
|
|
id UInt64,
|
|
|
|
value_int UInt64,
|
|
|
|
value_string String,
|
|
|
|
value_decimal Decimal64(8),
|
|
|
|
value_string_nullable Nullable(String)
|
|
|
|
)
|
|
|
|
PRIMARY KEY id
|
2021-03-28 10:35:26 +00:00
|
|
|
SOURCE(CLICKHOUSE(DB 'default' TABLE 'simple_key_flat_dictionary_source_table'))
|
2021-04-09 11:10:08 +00:00
|
|
|
LAYOUT(FLAT(INITIAL_ARRAY_SIZE 50000 MAX_ARRAY_SIZE 5000000))
|
2021-03-28 10:35:26 +00:00
|
|
|
LIFETIME(MIN 0 MAX 1000)
|
2021-03-27 14:00:00 +00:00
|
|
|
</create_query>
|
|
|
|
|
|
|
|
<fill_query>
|
2021-03-28 10:35:26 +00:00
|
|
|
INSERT INTO simple_key_flat_dictionary_source_table
|
2021-03-27 14:00:00 +00:00
|
|
|
SELECT number, number, toString(number), toDecimal64(number, 8), toString(number)
|
|
|
|
FROM system.numbers
|
2021-04-09 11:10:08 +00:00
|
|
|
LIMIT 5000000;
|
2021-03-27 14:00:00 +00:00
|
|
|
</fill_query>
|
|
|
|
|
2021-03-29 13:41:03 +00:00
|
|
|
<substitutions>
|
|
|
|
<substitution>
|
|
|
|
<name>column_name</name>
|
|
|
|
<values>
|
|
|
|
<value>'value_int'</value>
|
|
|
|
<value>'value_string'</value>
|
|
|
|
<value>'value_decimal'</value>
|
|
|
|
<value>'value_string_nullable'</value>
|
|
|
|
</values>
|
|
|
|
</substitution>
|
|
|
|
|
|
|
|
<substitution>
|
|
|
|
<name>elements_count</name>
|
|
|
|
<values>
|
2021-04-09 21:55:54 +00:00
|
|
|
<value>5000000</value>
|
|
|
|
<value>7500000</value>
|
2021-03-29 13:41:03 +00:00
|
|
|
</values>
|
|
|
|
</substitution>
|
|
|
|
</substitutions>
|
|
|
|
|
|
|
|
<query>
|
2021-04-14 13:49:38 +00:00
|
|
|
WITH rand64() % toUInt64({elements_count}) as key
|
|
|
|
SELECT dictGet('default.simple_key_flat_dictionary', {column_name}, key)
|
2021-04-09 11:10:08 +00:00
|
|
|
FROM system.numbers
|
|
|
|
LIMIT {elements_count}
|
|
|
|
FORMAT Null;
|
|
|
|
</query>
|
|
|
|
|
|
|
|
<query>
|
2021-04-13 18:13:04 +00:00
|
|
|
SELECT * FROM simple_key_flat_dictionary
|
|
|
|
FORMAT Null;
|
2021-04-13 12:57:11 +00:00
|
|
|
</query>
|
|
|
|
|
|
|
|
<query>
|
2021-04-14 13:49:38 +00:00
|
|
|
WITH rand64() % toUInt64(75000000) as key
|
|
|
|
SELECT dictHas('default.simple_key_flat_dictionary', key)
|
2021-03-29 13:41:03 +00:00
|
|
|
FROM system.numbers
|
2021-04-13 12:57:11 +00:00
|
|
|
LIMIT 75000000
|
2021-03-29 13:41:03 +00:00
|
|
|
FORMAT Null;
|
|
|
|
</query>
|
2021-03-27 14:00:00 +00:00
|
|
|
|
2021-03-28 10:35:26 +00:00
|
|
|
<drop_query>DROP TABLE IF EXISTS simple_key_flat_dictionary_source_table</drop_query>
|
2021-04-09 11:10:08 +00:00
|
|
|
|
2021-03-28 10:35:26 +00:00
|
|
|
<drop_query>DROP DICTIONARY IF EXISTS simple_key_flat_dictionary</drop_query>
|
|
|
|
|
2021-03-27 14:00:00 +00:00
|
|
|
</test>
|