You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Perf][C++] Bulk-copy contiguous BOUNDARY pages in the aligned reader #1075
A time range that covers only part of a chunk (e.g. a 1-day or 1-week query on a
single-chunk-per-month file) marks every page BOUNDARY, so AlignedChunkReader::get_next_page_multi_impl falls into the row-by-row scatter
loop: one RowAppender::append per value plus a per-timestamp filter re-check.
Measured at 8.6% of a 1-week wide-table query, and it made queries reading less
data as slow as a full-month query.
Proposed changes
A BOUNDARY page under a contiguous time filter (TimeBetween with not_between=false) has a fully matching [row_begin, row_end] range with no
interior holes, and the page is decoded whole, so its values are row-indexed at row_begin and can take the same bulk memcpy path as FULL_PASS.
Resolved by #1096. Filter::is_contiguous_time_filter() (true for a non-negated TimeBetween) now lets a fully covered BOUNDARY page take the bulk-copy path, since every timestamp between the page's first and last retained row passes, so [row_begin, row_end) is copied as a block instead of row by row. The same change decodes leading retained pages straight into the destination TsBlock instead of a per-page staging buffer. TimeIn, negated predicates and FIELD filters keep the row-by-row path.
Activity
ColinLeeo commentedon Nov 16, 2026
Resolved by #1096.
Filter::is_contiguous_time_filter()(true for a non-negatedTimeBetween) now lets a fully coveredBOUNDARYpage take the bulk-copy path, since every timestamp between the page's first and last retained row passes, so[row_begin, row_end)is copied as a block instead of row by row. The same change decodes leading retained pages straight into the destinationTsBlockinstead of a per-page staging buffer.TimeIn, negated predicates andFIELDfilters keep the row-by-row path.Closing as completed in develop.