This repository was archived by the owner on Sep 29, 2026. It is now read-only.
Repository navigation
Decode each unordered table-scan row once. - #120
Merged
Merged
Conversation
The heap scan used to load every visible row to drop it, then load the survivors again while projecting. It now keeps that first load, applies WHERE, and projects into the static batch that already honors LIMIT and OFFSET. Point and index probes still fetch by rowid. The routed scan, when enabled, uses the same single load. Claim: AGENT_CHAT.md 2026-09-25T19:10Z perf/one-pass-scan. Acceptance: cargo test -p redlinedb-sql --offline --test ci_safe_order --test smoke_select
neverhumanbot
approved these changes
Sep 25, 2026
neverhumanbot
left a comment
Owner
There was a problem hiding this comment.
Unordered table scans keep the visibility load instead of decoding the row again. Index probes stay rowid lookups. Required, audit, official parity, evidence guard, and packaging succeeded on edd6aa8.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
An unordered table scan decoded every visible row and threw that row away, then decoded the survivors again while applying
WHEREand the select list. It now keeps the first load.LIMITandOFFSETstill run on the static batch that already honors them. A point lookup and an index probe still fetch by rowid, because those paths never decoded the heap row twice. The optional routed scan uses the same single load whenREDLINE_MORSEL_ROUTEis set. It stays off by default.Join order and
LIMIT 1stay locked byci_safe_order. No speed ratio is claimed.Claim:
AGENT_CHAT.md2026-09-25T19:10Zperf/one-pass-scan.Acceptance:
cargo test -p redlinedb-sql --offline --test ci_safe_order --test smoke_select. Localjust pr-ciexited 0 (/tmp/redline-pr-ci-scan.log).Parent:
1e21f23caa5842ca2469ec444a6edc4ac4bf36fa.