Repository navigation
perf: prune scalar index segments by fragment scope - #9449
Merged
yanghua merged 1 commit intoSep 22, 2026
Merged
Conversation
Co-authored-by: TRAE CLI <[email protected]>
ddupg
force-pushed
the
perf/scalar-prefilter-segment-pruning
branch
from
September 21, 2026 07:03
47e93cc to
2dbc370
Compare
ddupg
marked this pull request as ready for review
September 21, 2026 07:03
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
This keeps the optimization at the scalar-index loading boundary: only physical segments intersecting the scanner’s established fragment scope are opened, while partial overlaps, serialized coverage, fallback scans, stable row IDs, and prefilter behavior retain their existing semantics. Keeping unscoped callers unchanged is preferable to widening the scalar-index trait or changing result-mask semantics globally.
LuQQiu
added a commit
that referenced
this pull request
Sep 23, 2026
Combination tests for FRI v1 composed with #9449 scalar fragment-scope pruning. The pruning consumes each segment's FRI-effective coverage, so a query scoped to one reclustered destination keeps every source segment that contributed to it and prunes segments that do not intersect it. The derived-listing cache holds the full effective listing per snapshot, so scoping one query does not poison the next on the same snapshot. Co-Authored-By: Claude Opus 4.8 <[email protected]>
LuQQiu
added a commit
that referenced
this pull request
Sep 23, 2026
Combination tests for FRI v1 composed with #9449 scalar fragment-scope pruning. The pruning consumes each segment's FRI-effective coverage, so a query scoped to one reclustered destination keeps every source segment that contributed to it and prunes segments that do not intersect it. The derived-listing cache holds the full effective listing per snapshot, so scoping one query does not poison the next on the same snapshot. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This was referenced Oct 15, 2026
Closed
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.
Part of #9282.
Scalar filters currently open every usable segment of a named index, even when the read or search only needs a subset of fragments. This prunes segments whose coverage does not intersect that scope before opening them, including ordinary scans and scalar prefilters for vector and full-text search.
Partially overlapping segments remain eligible. The serialized result coverage is restricted to the evaluated scope, while existing filtered-read fallback, rechecks, and direct-prefilter eligibility remain unchanged.
Validation:
cargo fmt --all.cargo clippy --all --tests --benches -- -D warnings.