15 Commits
Author SHA1 Message Date
Yarik Briukhovetskyi a43327cdee Merge pull request #124958 from ClickHouse/yarik/lower-empty-array-to-single-to-left-array-join
Rewrite `arrayJoin(emptyArrayToSingle(x))` -> `LEFT ARRAY JOIN x`
2026-10-19 13:19:38 +00:00
yariks5s 3499c5f50e Fuse a filter into LEFT ARRAY JOIN, keep LIMIT through it only without a fused filter 2026-10-14 15:59:09 +00:00
yariks5s 0cda9bffe8 Plan arrayJoin(emptyArrayToSingle(x)) as LEFT ARRAY JOIN x 2026-10-09 16:38:47 +00:00
yariks5s 1c44a037d3 Count only the referenced nested rows when deciding to materialize a replicated column 2026-10-09 12:51:16 +00:00
yariks5s 034400515c Merge remote-tracking branch 'origin/master' into yarik/array-join-lazy-passengers-without-cut
# Conflicts:
#	src/Interpreters/ArrayJoinAction.cpp
#	tests/performance/array_join.xml
2026-10-09 11:11:03 +00:00
yariks5s 7ab885de9c Trim comments 2026-09-21 15:23:27 +00:00
yariks5s b2a636c4e9 Trim comments 2026-09-21 15:22:44 +00:00
yariks5s 78edf687c6 Add a wide-passenger ARRAY JOIN performance query with lazy replication on 2026-09-21 15:19:38 +00:00
yariks5s 8d0d90b8fa Add a chained ARRAY JOIN performance query over lazily replicated arrays 2026-09-21 15:17:23 +00:00
Groene AIandClaude Opus 5 4d00734df6 Give the array_join String benchmark a sink so it measures replication
tests/performance/array_join.xml query 6 has no sink, alone among the seven
queries of that file, so it returns all 45,000,000 result rows to the client:
540 MB on the wire, and 94-97% of its wall clock blocked in network send
(UserTimeMicroseconds 0.51 s of a 6.42 s run). That transfer is what its
7090 ms amd p50 measures, against 47-275 ms for queries 0-5 in the same file,
a documented ideal of 0.1-1 s and report.py's 2 s flag. Its tail also crosses
perf.py's 15 s per-run cap, and the resulting Code 159 ends the whole test file,
leaving the other six queries unmeasured. tests/performance/scripts/README.md:64-66
names the class, "a forgotten format Null".

Two settings are appended to that one query, nothing else changes:

  format Null discards the result, so 540,088,942 bytes on the wire become 81
  and the query goes from 6.479 s to 0.092 s.

  enable_lazy_columns_replication = 0 keeps the benchmark on its subject. The
  query uses the arrayJoin function form and query_plan_lower_array_join_function
  is off by default, so the expansion runs in ExpressionActions, which wraps the
  String passenger in a lazy ColumnReplicated; without the pin only 12.5% of the
  run is spent in ColumnString::replicate (562 of 4752 sampled frames), with it
  63% (2478 of 6100). array_join_filter_fusion.xml:26 pins the same setting for
  the same reason, and the lazy path keeps its own coverage in five other perf
  tests.

Measured with the master amd_release binary at the perf job's own configuration
(max_threads=8, 8 pinned physical cores, the perf users profile), a rig whose
medians sit within 11% of the shard's CIDB p50 on all seven queries of the file.
Through perf.py the file's run stage drops from 53.5 s to 8.4 s with all 7
queries measured. numbers(10000000), the projection and the expansion are
untouched, so the replicated volume is what it has been since 2024. Query 6's
measurement changes meaning, so its per-query history is incomparable across
this commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 11:27:51 +00:00
taiyang-li dc9548d31b add perf test 2024-03-13 18:57:33 +08:00
Alexander Kuzmenkov aeb8431004 update thresholds - 1 2021-05-20 17:14:55 +03:00
Alexander Kuzmenkov a12cc5f559 adjust perf test thresholds 2021-03-26 00:00:18 +03:00
Alexey Milovidov 785d2c0e01 Remove garbage from performance tests 2020-04-18 15:54:16 +03:00
Ivan 97f2a2213e Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00