perf: fallback to brute force FTS if filters matching fewer rows#4551
Merged
BubbleCal merged 2 commits intolance-format:mainfrom Aug 24, 2025
Merged
perf: fallback to brute force FTS if filters matching fewer rows#4551BubbleCal merged 2 commits intolance-format:mainfrom
BubbleCal merged 2 commits intolance-format:mainfrom
Conversation
Signed-off-by: BubbleCal <bubble-cal@outlook.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4551 +/- ##
==========================================
- Coverage 81.13% 81.05% -0.08%
==========================================
Files 308 308
Lines 113944 114382 +438
Branches 113944 114382 +438
==========================================
+ Hits 92448 92717 +269
- Misses 18238 18396 +158
- Partials 3258 3269 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
@BubbleCal can you post some evidence or charts of the improvement? |
Contributor
Author
|
tested with query: on random 1M docs with this improvement: without this improvement: |
Xuanwo
approved these changes
Aug 24, 2025
LuQQiu
approved these changes
Aug 24, 2025
… length Signed-off-by: BubbleCal <bubble-cal@outlook.com>
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.
if the filters match only a few rows, it may cause the WAND fails to filter out docs.
So we can evaluate only the matched rows, which would be much faster than running WAND first, this means to decompress at most
num_rows_matched * num_tokensblocks