2022-06-29 13:13:39 +00:00
<test >
2022-06-29 23:24:20 +00:00
<!-- high cardinality -->
2022-06-30 13:03:39 +00:00
<create_query > CREATE TABLE distinct_cardinality_high (high UInt64, medium UInt64, low UInt64) ENGINE MergeTree() ORDER BY (high, medium)</create_query>
2022-07-01 22:50:00 +00:00
<fill_query > INSERT INTO distinct_cardinality_high SELECT number % 1e6, number % 1e4, number % 1e2 FROM numbers_mt(1e8)</fill_query>
2023-02-05 13:38:20 +00:00
<fill_query > OPTIMIZE TABLE distinct_cardinality_high FINAL</fill_query>
2022-06-29 13:13:39 +00:00
2022-06-30 13:03:39 +00:00
<query > SELECT DISTINCT high FROM distinct_cardinality_high FORMAT Null</query>
<query > SELECT DISTINCT high, medium FROM distinct_cardinality_high FORMAT Null</query>
2022-06-29 13:13:39 +00:00
2022-07-22 22:46:56 +00:00
<query > SELECT DISTINCT high, medium FROM distinct_cardinality_high ORDER BY high, medium FORMAT Null</query>
2022-06-30 13:03:39 +00:00
<query > SELECT DISTINCT high, medium FROM distinct_cardinality_high ORDER BY high FORMAT Null</query>
2022-06-29 13:13:39 +00:00
2022-06-29 23:24:20 +00:00
<drop_query > DROP TABLE IF EXISTS distinct_cardinality_high</drop_query>
<!-- low cardinality -->
2022-06-30 13:03:39 +00:00
<create_query > CREATE TABLE distinct_cardinality_low (low UInt64, medium UInt64, high UInt64) ENGINE MergeTree() ORDER BY (low, medium)</create_query>
2022-07-01 22:50:00 +00:00
<fill_query > INSERT INTO distinct_cardinality_low SELECT number % 1e2, number % 1e4, number % 1e6 FROM numbers_mt(1e8)</fill_query>
2023-02-05 13:38:20 +00:00
<fill_query > OPTIMIZE TABLE distinct_cardinality_low FINAL</fill_query>
2022-06-29 23:24:20 +00:00
2022-06-30 13:03:39 +00:00
<query > SELECT DISTINCT low FROM distinct_cardinality_low FORMAT Null</query>
<query > SELECT DISTINCT low, medium FROM distinct_cardinality_low FORMAT Null</query>
2022-06-29 23:24:20 +00:00
2022-07-22 22:46:56 +00:00
<query > SELECT DISTINCT low, medium FROM distinct_cardinality_low ORDER BY low, medium FORMAT Null</query>
2022-06-30 13:03:39 +00:00
<query > SELECT DISTINCT low, medium FROM distinct_cardinality_low ORDER BY low FORMAT Null</query>
2022-06-29 23:24:20 +00:00
<drop_query > DROP TABLE IF EXISTS distinct_cardinality_low</drop_query>
2022-06-29 13:13:39 +00:00
</test>