perf: batch execution AND/OR/NAND - #479
Open
cheb0 wants to merge 1 commit into
Open
Conversation
cheb0
force-pushed
the
329-batch-execution
branch
3 times, most recently
from
July 29, 2026 08:49
5891414 to
85278eb
Compare
cheb0
marked this pull request as ready for review
July 31, 2026 05:59
cheb0
force-pushed
the
329-batch-execution
branch
from
July 31, 2026 09:10
85278eb to
c5804e0
Compare
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.
Description
Batch execution allows to iterate over inverted index batch by batch instead of lid by lid.
Batches are either of slice or roaring bitmap type. When batches are intersected/unioned they are converted to bitmaps.
Enabling
rangenode can have at most 5 tids resolvedIteration cost evaluation allows to enable batching when it's really worth it. In that case we know some good amount of LID blocks will be directly used as bitmaps and not be converted.
Results
Major problems
There are problems I found while working on batch execution. Can be partially addressed in future.
LIDBatch- interface dispatch overhead is now present on inverted index which has partially affected hot queries performance.NextGEQ(single function)nodeOrBatchedMulti) can yield a large batch of size more than LID block. Truncating a batch can cost CPU and increase query execution time.