Skip to content

Refactor planning and execution#223

Draft
jzombie wants to merge 80 commits intomainfrom
211-refactor-logical-planner
Draft

Refactor planning and execution#223
jzombie wants to merge 80 commits intomainfrom
211-refactor-logical-planner

Conversation

@jzombie
Copy link
Owner

@jzombie jzombie commented Dec 9, 2025

No description provided.

* Prototype granular perf calcs

* Add TODOs

* Prototype batched row counts

* Unify total row count handling

* Prototype perf monitoring

* Apply cargo formatting

* Prototype query-based perf monitoring

* Add hit count

* Add TODOs for multi-table physical planning

* Simplify query context

* Update comment

* Verify zero-cost of timing code

* Verify assembly is different if perf enabled

* Add comment

* Remove erroneous side effect

* Manually feature-gate macros

Also add `measure_with_duration` which always times the internal code

* Remove assertion which conflicts with SLT tests

* Add TODOs

* Update SQL tests to match current SLT expectations

* Set `LLKV_PERF_SLOW_MS` to 1 second in CI

* Rename macros for clarity

* Fix bench compilation

* Temporarily bypass failing test

* Reimplement support for correlated subqueries

* Add TODO

* Initial conversion to Arc-based plan vectors

* Add TODOs

* Remove older, duplicated physical planner structs

* Transition many Vec to Arc-wrapped slices

* Fix failing pager tests

This is unrelated to the previous commit's Arc update, and likely a slight regression after reimplementing support for correlated subqueries (c70c1), though I haven't confirmed.

* Resolve Clippy warnings

* Debug Windows failure with TOML-safe path handling

* Rename tests for consistency

* Add TODO

* Prototype hash perf optimizations

* Replace std HashMap with FxHashMap

* Lint deps

* Add'l dep lint

* `cargo fmt --all`

* Comment-out log spam

* Debug failing lint

* Fix incorrect empty projection assumption

* Resolve lint warnings

* Resolve Clippy warnings

* Ensure `run_script_at_path` respects `SLT_HARNESS_STACK_SIZE`

* `cargo fmt --all`
@jzombie jzombie marked this pull request as ready for review December 12, 2025 21:55
@jzombie jzombie marked this pull request as draft December 12, 2025 21:55
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 12, 2025

CodSpeed Performance Report

Merging #223 will degrade performances by 53.53%

Comparing 211-refactor-logical-planner (3b66a0a) with main (8977772)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

⚡ 9 improvements
❌ 9 regressions
✅ 57 untouched
⏩ 2 skipped1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Mode Benchmark BASE HEAD Change
WallTime hash_join_many_to_many[1000] 129.9 µs 77.5 µs +67.61%
WallTime scan_stream_expr_add_one 3.5 ms 3 ms +16.35%
WallTime hash_join_anti_join[1000] 35 µs 75.2 µs -53.53%
WallTime storage_fused_both_case_sensitive 7.5 ms 6.4 ms +16.84%
WallTime hash_join_left_join[10000] 508.8 µs 617.4 µs -17.59%
WallTime hash_join_left_join[1000] 149.9 µs 101.9 µs +47.09%
WallTime hash_join_no_matches[1000] 114.1 µs 71.3 µs +60.09%
WallTime hash_join_semi_join[1000] 30.4 µs 40.6 µs -25.08%
WallTime hash_join_inner_join[10000] 605.3 µs 796.5 µs -24.01%
WallTime hash_join_anti_join[10000] 271.2 µs 445.5 µs -39.13%
WallTime storage_sequential_both_case_sensitive 54.9 ms 49.4 ms +11.14%
WallTime hash_join_semi_join[10000] 219.4 µs 310.2 µs -29.26%
WallTime storage_fused_starts_case_insensitive 8.4 ms 7.5 ms +13.25%
WallTime table_layer_sum 2.4 ms 2.1 ms +13.06%
WallTime hash_join_semi_join[100000] 3.1 ms 3.5 ms -11.41%
WallTime hash_join_semi_join[1000000] 36.7 ms 43.2 ms -14.94%
WallTime ingest_mixed_1M[batches=64] 340.9 ms 381.6 ms -10.67%
WallTime select4_full 7.6 s 5.6 s +35.32%

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant