mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
53bac4de71
CI [1]: DB::Exception: Cannot drop or rename default.hierarchical_dictionary_source_table, because some tables depend on it: default.hierarchical_hashed_array_dictionary, default.hierarchical_flat_dictionary, default.hierarchical_hashed_dictionary. Stack trace: [1]: https://s3.amazonaws.com/clickhouse-test-reports/44256/8e67a361a8f14abec6717af09ee997eb25151685/performance_comparison_[1/4]/report.html Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
138 lines
4.4 KiB
XML
138 lines
4.4 KiB
XML
<test>
|
|
<create_query>
|
|
CREATE TABLE simple_key_direct_dictionary_source_table
|
|
(
|
|
id UInt64,
|
|
value_int UInt64,
|
|
value_string String,
|
|
value_decimal Decimal64(8),
|
|
value_string_nullable Nullable(String)
|
|
) ENGINE = Memory;
|
|
</create_query>
|
|
|
|
<create_query>
|
|
CREATE TABLE complex_key_direct_dictionary_source_table
|
|
(
|
|
id UInt64,
|
|
id_key String,
|
|
value_int UInt64,
|
|
value_string String,
|
|
value_decimal Decimal64(8),
|
|
value_string_nullable Nullable(String)
|
|
) ENGINE = TinyLog;
|
|
</create_query>
|
|
|
|
<create_query>
|
|
CREATE DICTIONARY simple_key_direct_dictionary
|
|
(
|
|
id UInt64,
|
|
value_int UInt64,
|
|
value_string String,
|
|
value_decimal Decimal64(8),
|
|
value_string_nullable Nullable(String)
|
|
)
|
|
PRIMARY KEY id
|
|
SOURCE(CLICKHOUSE(DB 'default' TABLE 'simple_key_direct_dictionary_source_table'))
|
|
LAYOUT(DIRECT())
|
|
</create_query>
|
|
|
|
<create_query>
|
|
CREATE DICTIONARY complex_key_direct_dictionary
|
|
(
|
|
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
|
|
SOURCE(CLICKHOUSE(DB 'default' TABLE 'complex_key_direct_dictionary_source_table'))
|
|
LAYOUT(COMPLEX_KEY_DIRECT())
|
|
</create_query>
|
|
|
|
<fill_query>
|
|
INSERT INTO simple_key_direct_dictionary_source_table
|
|
SELECT number, number, toString(number), toDecimal64(number, 8), toString(number)
|
|
FROM system.numbers
|
|
LIMIT 50000;
|
|
</fill_query>
|
|
|
|
<fill_query>
|
|
INSERT INTO complex_key_direct_dictionary_source_table
|
|
SELECT number, toString(number), number, toString(number), toDecimal64(number, 8), toString(number)
|
|
FROM system.numbers
|
|
LIMIT 50000;
|
|
</fill_query>
|
|
|
|
<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>
|
|
<value>50000</value>
|
|
<value>75000</value>
|
|
</values>
|
|
</substitution>
|
|
</substitutions>
|
|
|
|
<query>
|
|
WITH rand64() % toUInt64({elements_count}) as key
|
|
SELECT dictGet('default.simple_key_direct_dictionary', {column_name}, key)
|
|
FROM system.numbers
|
|
LIMIT {elements_count}
|
|
FORMAT Null;
|
|
</query>
|
|
<query>
|
|
WITH rand64() % toUInt64({elements_count}) as key
|
|
SELECT dictGet('default.simple_key_direct_dictionary', ('value_int', 'value_string', 'value_decimal', 'value_string_nullable'), key)
|
|
FROM system.numbers
|
|
LIMIT {elements_count}
|
|
FORMAT Null;
|
|
</query>
|
|
<query>
|
|
WITH rand64() % toUInt64({elements_count}) as key
|
|
SELECT dictHas('default.simple_key_direct_dictionary', key)
|
|
FROM system.numbers
|
|
LIMIT {elements_count}
|
|
FORMAT Null;
|
|
</query>
|
|
|
|
<query>
|
|
WITH (number, toString(number)) as key
|
|
SELECT dictGet('default.complex_key_direct_dictionary', {column_name}, key)
|
|
FROM system.numbers
|
|
LIMIT {elements_count}
|
|
FORMAT Null;
|
|
</query>
|
|
<query>
|
|
WITH (number, toString(number)) as key
|
|
SELECT dictGet('default.complex_key_direct_dictionary', ('value_int', 'value_string', 'value_decimal', 'value_string_nullable'), key)
|
|
FROM system.numbers
|
|
LIMIT {elements_count}
|
|
FORMAT Null;
|
|
</query>
|
|
<query>
|
|
WITH (number, toString(number)) as key
|
|
SELECT dictHas('default.complex_key_direct_dictionary', key)
|
|
FROM system.numbers
|
|
LIMIT {elements_count}
|
|
FORMAT Null;
|
|
</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>
|
|
|
|
<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>
|
|
</test>
|