mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
38 lines
2.1 KiB
XML
38 lines
2.1 KiB
XML
<!-- Performance tests for RIGHT/FULL join non-joined emission. -->
|
|
<test>
|
|
<substitutions>
|
|
<substitution>
|
|
<name>probe_key</name>
|
|
<values>
|
|
<value>k1</value> <!-- 90% unmatched -->
|
|
<value>k2</value> <!-- 10% unmatched -->
|
|
</values>
|
|
</substitution>
|
|
</substitutions>
|
|
|
|
<settings>
|
|
<join_algorithm>hash</join_algorithm>
|
|
<query_plan_join_swap_table>0</query_plan_join_swap_table>
|
|
</settings>
|
|
|
|
<create_query>CREATE TABLE build_wide (k UInt64, a UInt64, b UInt64, c UInt64, d UInt64, e UInt64, f UInt64, g UInt64) ENGINE = MergeTree ORDER BY tuple()</create_query>
|
|
<create_query>CREATE TABLE build_nullable (k UInt64, a Nullable(UInt64), b Nullable(UInt64), c Nullable(UInt64), d Nullable(UInt64), e Nullable(UInt64), f Nullable(UInt64), g Nullable(UInt64)) ENGINE = MergeTree ORDER BY tuple()</create_query>
|
|
<create_query> CREATE TABLE probe (k1 UInt64, k2 UInt64) ENGINE = MergeTree ORDER BY tuple()</create_query>
|
|
|
|
<fill_query>INSERT INTO build_wide SELECT number, number, number, number, number, number, number, number FROM numbers(2000000)</fill_query>
|
|
<fill_query>INSERT INTO build_nullable WITH if(number % 10 = 0, NULL, number) AS n SELECT number, n, n, n, n, n, n, n FROM numbers(2000000)</fill_query>
|
|
<fill_query>INSERT INTO probe SELECT number + 1800000, number + 200000 FROM numbers(2000000) ORDER BY rand()</fill_query>
|
|
|
|
<!-- RIGHT JOIN -->
|
|
<query>SELECT * FROM probe p RIGHT JOIN build_wide b ON p.{probe_key} = b.k FORMAT Null</query>
|
|
<query>SELECT * FROM probe p RIGHT JOIN build_nullable b ON p.{probe_key} = b.k FORMAT Null</query>
|
|
|
|
<!-- FULL JOIN -->
|
|
<query>SELECT * FROM probe p FULL JOIN build_wide b ON p.{probe_key} = b.k FORMAT Null</query>
|
|
<query>SELECT * FROM probe p FULL JOIN build_nullable b ON p.{probe_key} = b.k FORMAT Null</query>
|
|
|
|
<drop_query>DROP TABLE IF EXISTS build_wide</drop_query>
|
|
<drop_query>DROP TABLE IF EXISTS build_nullable</drop_query>
|
|
<drop_query>DROP TABLE IF EXISTS probe</drop_query>
|
|
</test>
|