Repository navigation
Conversation
zzylol
force-pushed
the
stack/windows-2-segments
branch
from
October 5, 2026 03:07
7148bf3 to
14921d0
Compare
4 tasks done
…eps (Q66) Stage 3 charged every query-time TimeShift (as a pass-through) and every query-time TimeRange (as a filter) one operation per row of the scan below it. Over Example 3a's shared 5-year scan each shift and range cost as much as the scan's rows, so the shared-segment plan (10 of them) lost to the shared-input plan (8). A TimeShift now costs nothing at either timing: it only re-labels time, and the executor folds the offset into the time bounds of the read below it. A query-time TimeRange is charged one operation per row it keeps; at ingestion time it keeps every arriving row, so nothing changes there. Pane roles are unchanged. Example 3a and 4a now select the shared 1-year segments (18,104/s vs 25,112/s for shared input in 3a). Example 3b/4 Pattern B's query-time panes now take 130 ms per evaluation, within the 200 ms bound, so B2 is valid (still costlier than the selected plan). Example 1's selection is unchanged; its plans with tumbling panes get cheaper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Example 3a and 4a now select the shared 1-year segments, and 3b's query-time panes meet the latency bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
stack/windows-3-pricing
branch
from
October 5, 2026 06:21
44291c9 to
9cf2956
Compare
This was referenced Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Stack: #574 → #620 → #618 → #621 → #627 → #625 → #628 → #632 → #634 → #616 → #617 → #622 → #624 → #629 → #630 → #631 → #633 → #635 → #636 → #637
Problem
Stage 3 (
crates/plan-selection/src/lib.rs) charged every query-timeTimeShift(as a pass-through) and every query-timeTimeRange(as a filter) one operation per row of the scan below them. Over Example 3a's shared 5-year scan, each shift and each range cost 2,920/s, the same as the whole scan. The shared-segment plan from #628 has 10 of them and the selected shared-input plan has 8, so segments cost 44,384/s against 39,128/s.Changes (Q66)
promql_fallback.rs,series_window(.., offset, ..)), and the per-entity summary path reads the shifted raw rows from the deployment (physical_planner/mod.rs, Pass 2 sharing and Stage 1 coverage parity with the retired MajorPass #580). So pricing it at zero is not an approximation for this executor.PaneRole) are unchanged. Retained panes and the shifts and ranges that feed only them still cost 0. The newest pane's shift is now free too. The ingestion-time pane test now expects 3 charged nodes instead of 4.docs/design_docs/proposals/stage3-cost-model.md: new "Time shifts and ranges (Q66)" paragraph. Example 1's materialized runner-up changes from 47.407 to 47.340.tools/dag-viewer/examples/planner-layering-example1.jsonis regenerated (--max-candidates 160). The selection (P82, 4.620) is the same. The 32 plans that use tumbling panes get cheaper because their shifts are now free and their ranges charge only kept rows (for example, P14 goes from 12.84 to 8.44).tools/dag-viewer/examples.json: the 3a, 3b and 4a stories now describe the new selections.stage3_b_tumbling_candidates_are_valid,stage3_b_rebuilding_a_million_series_meets_the_latency_bound). The unit testlatency_bound_rejects_slow_query_time_workstill covers the rejection.Selections (
stage_pipeline --example planner-layering-<e>)Test plan
time_shift_is_free_and_time_range_pays_for_the_rows_it_keeps: over a shared 5-year scan, the shift costs 0, and the 1-year and 5-year ranges are charged the same price per kept row.cargo fmt --all --check,cargo clippy --workspace --all-targets -D warningscargo test --workspace: 1690 passed, 0 failed, 13 ignored (after the rebase on main d4869a7; was 1679 passed, 13 ignored)tools/dag-viewer:python3 -m unittest test_viewer: 25 OKStacked on #628 (
stack/windows-2-segments).🤖 Generated with Claude Code