Skip to content

Release v1.7.8 — batch-mode pipelined self-time (#215 D1)#269

Merged
erikdarlingdata merged 1 commit into
mainfrom
dev
Apr 24, 2026
Merged

Release v1.7.8 — batch-mode pipelined self-time (#215 D1)#269
erikdarlingdata merged 1 commit into
mainfrom
dev

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

Fix for Joe's #215 D1: Parallelism (Gather Streams) over a batch-mode zone was reporting bogus 21s self-time. Batch-mode operators pipeline, so the correct self-time subtracts sum across the batch subtree, not just the direct child. On Joe's plan 5GQmlu6m7W, Parallelism self goes from 21,168ms to 0ms (matches his 21.177 − 0.009 − 10.294 − 13.761 exactly).

See PR #268.

🤖 Generated with Claude Code

…f-time (#215 D1) (#268)

Joe's plan 5GQmlu6m7W has a Parallelism (Gather Streams) above a batch-mode
zone of three operators: Compute Scalar (9ms) / Hash Match Aggregate
(10,294ms) / Clustered Index Scan (13,761ms). The exchange itself has
elapsed 21,177ms and was being reported with 21,168ms of self-time because
GetEffectiveChildElapsedMs only subtracted the direct child (the 9ms
Compute Scalar).

Batch mode pipelines operators — each operator's elapsed is standalone wall
time for that operator, not cumulative of descendants the way row mode is.
So for a row-mode parent above a batch-mode subtree, the correct "effective
child elapsed" is the sum across the whole batch pipeline, not just the
direct child.

New SumBatchSubtreeElapsedMs walks a contiguous batch-mode zone (stopping at
Parallelism boundaries) and sums ActualElapsedMs. GetEffectiveChildElapsedMs
now routes batch-mode children with actual stats through that helper.

Result on 5GQmlu6m7W: Parallelism self-time goes from 21,168ms (~56% of
statement) to 0ms (clamped — 21.177 - 24.064 is negative, matching Joe's
math). No more bogus "Expensive Operator" warning on the gather-streams.

Regression check:
- c1-c5.sqlplan (serial row mode) — all warnings unchanged
- 20260415_1.sqlplan (parallel batch-mode) — all wait benefits and operator
  warnings unchanged (the batch subtree rule only fires when computing
  self-time of a row-mode parent above a batch child)

D2 (unhelpful CXPACKET warning) was already addressed by v1.7.7's
WaitStatsKnowledge content strip — the CXPACKET item now shows only the
raw wait ms/count, no speculative fix text. Joe's deeper concern about
CXPACKET double-counting other waits is a separate future refinement.

Version bump 1.7.7 -> 1.7.8.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 4cce22d into main Apr 24, 2026
3 checks passed
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