Added performance tests

This commit is contained in:
Maksim Kita 2021-10-23 15:01:30 +03:00
parent 3a6f55607d
commit 4ccc619bd5
4 changed files with 31 additions and 7 deletions

View File

@ -635,9 +635,9 @@ PaddedPODArray<Int64> RangeHashedDictionary<dictionary_key_type>::makeDateKeys(
for (size_t i = 0; i < keys.size(); ++i)
{
if (Range::isCorrectDate(block_start_dates[i]))
keys[i] = block_start_dates[i];
keys[i] = block_start_dates[i]; // NOLINT
else
keys[i] = block_end_dates[i];
keys[i] = block_end_dates[i]; // NOLINT
}
return keys;

View File

@ -61,15 +61,15 @@
</query>
<query>
SELECT * FROM simple_key_flat_dictionary
WITH rand64() % toUInt64({elements_count}) as key
SELECT dictHas('default.simple_key_flat_dictionary', key)
FROM system.numbers
LIMIT {elements_count}
FORMAT Null;
</query>
<query>
WITH rand64() % toUInt64(75000000) as key
SELECT dictHas('default.simple_key_flat_dictionary', key)
FROM system.numbers
LIMIT 75000000
SELECT * FROM simple_key_flat_dictionary
FORMAT Null;
</query>

View File

@ -94,6 +94,7 @@
LIMIT {elements_count}
FORMAT Null;
</query>
<query>
WITH rand64() % toUInt64({elements_count}) as key
SELECT dictHas('default.simple_key_hashed_array_dictionary', key)
@ -102,6 +103,11 @@
FORMAT Null;
</query>
<query>
SELECT * FROM simple_key_hashed_array_dictionary
FORMAT Null;
</query>
<query>
WITH (rand64() % toUInt64({elements_count}), toString(rand64() % toUInt64({elements_count}))) as key
SELECT dictGet('default.complex_key_hashed_array_dictionary', {column_name}, key)
@ -109,6 +115,7 @@
LIMIT {elements_count}
FORMAT Null;
</query>
<query>
WITH (rand64() % toUInt64({elements_count}), toString(rand64() % toUInt64({elements_count}))) as key
SELECT dictHas('default.complex_key_hashed_array_dictionary', key)
@ -117,6 +124,11 @@
FORMAT Null;
</query>
<query>
SELECT * FROM complex_key_hashed_array_dictionary
FORMAT Null;
</query>
<drop_query>DROP TABLE IF EXISTS simple_key_hashed_array_dictionary_source_table;</drop_query>
<drop_query>DROP TABLE IF EXISTS complex_key_hashed_array_dictionary_source_table;</drop_query>

View File

@ -94,6 +94,7 @@
LIMIT {elements_count}
FORMAT Null;
</query>
<query>
WITH rand64() % toUInt64({elements_count}) as key
SELECT dictHas('default.simple_key_hashed_dictionary', key)
@ -102,6 +103,11 @@
FORMAT Null;
</query>
<query>
SELECT * FROM simple_key_hashed_dictionary
FORMAT Null;
</query>
<query>
WITH (rand64() % toUInt64({elements_count}), toString(rand64() % toUInt64({elements_count}))) as key
SELECT dictGet('default.complex_key_hashed_dictionary', {column_name}, key)
@ -109,6 +115,7 @@
LIMIT {elements_count}
FORMAT Null;
</query>
<query>
WITH (rand64() % toUInt64({elements_count}), toString(rand64() % toUInt64({elements_count}))) as key
SELECT dictHas('default.complex_key_hashed_dictionary', key)
@ -117,6 +124,11 @@
FORMAT Null;
</query>
<query>
SELECT * FROM complex_key_hashed_dictionary
FORMAT Null;
</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>