Repository navigation
perf(duckdb): push down join filters and optimize JOB scans - #10507
Draft
joseph-isaacs wants to merge 3 commits into
Draft
joseph-isaacs wants to merge 3 commits into
joseph-isaacs wants to merge 3 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DuckDB provides runtime join filters, optional-filter sampling policies, and scan-order hints that the Vortex integration did not fully consume. This change uses those inputs, improves compressed predicates and hash-build selection, and memory-maps immutable local files to avoid positional reads and compressed-buffer copies.
Updated onto develop
c1a2ca1262, including develop's SQLIN/NOT INnull semantics (#10054).Performance
Current local x86_64 results at
9e1c1fe4: all 113 JOB queries, eight DuckDB threads, five iterations, all three formats stored as persistent local files. Hot time is the sum of each query's median over iterations 2–5; these are warm-cache measurements.The isolated local reader experiment before the final develop merge reduced Vortex hot time from 8.499 s to 6.423 s (24.4% lower), with all 113 query medians improved. An ABBA recheck of six targeted queries with 11 iterations per invocation reduced their combined hot time by 15.9%.
Cold-file reader comparisons on 7b, 16a, and 25b reduced Vortex time by 37.5%, 9.4%, and 12.7%. Each process started after per-file cache eviction;
mincoreverified zero resident pages across all 21 Vortex inputs before launch. These compare Vortex's positional and mapped readers, and do not compare cold Parquet or native DuckDB. Binding/metadata setup remains outside the query timer.Earlier GitHub JOB on NVMe results at
6a7cb232used ARM hardware and precede the memory-map change. Vortex hot time was 4.753 s versus 26.130 s for Parquet and 6.920 s for native. Compared with PR #10484's matching ARM run, Vortex improved from 5.387 s to 4.753 s (11.8%). That revision comparison includes intervening develop changes. Absolute ARM and local x86 times are separate comparisons.Changes
VORTEX_DUCKDB_MEMORY_MAP=0positional-read fallback. Remote scans retain their existing reader.Validation
cargo +nightly fmt --all,cargo clippy --all-targets --all-features -- -D warnings, and DuckDB doctests passed.25 JOB queries still lose to native in the latest local run. All measurements use DuckDB 1.5.5. The newer development-line prefix-range runtime join filter is not yet integrated; that requires an updated DuckDB bridge.