mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
Tests 100 UNION ALL subqueries with GROUP BY + ORDER BY on a single-row table where no rows match the filter. This measures the overhead of pipeline construction (transforms, resize) when there is essentially no data to process — the scenario improved by capping the post-aggregation resize to `min(max_threads, numStreams)`. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
116 lines
13 KiB
XML
116 lines
13 KiB
XML
<test>
|
|
<create_query>
|
|
CREATE TABLE short_agg_test (time DateTime, path String, hits UInt64) ENGINE = MergeTree ORDER BY (path, time)
|
|
</create_query>
|
|
|
|
<fill_query>
|
|
INSERT INTO short_agg_test VALUES (now(), '', 0)
|
|
</fill_query>
|
|
|
|
<!-- 100 UNION ALL of short queries with GROUP BY + ORDER BY that return no rows.
|
|
Tests the overhead of pipeline construction (transforms, resize) when there is no data to process. -->
|
|
<query>
|
|
SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
UNION ALL SELECT time::Date AS d, sum(hits), count() FROM short_agg_test WHERE path = 'nonexistent' GROUP BY d ORDER BY d
|
|
FORMAT Null
|
|
</query>
|
|
|
|
<drop_query>DROP TABLE IF EXISTS short_agg_test</drop_query>
|
|
</test>
|