Skip to content

[Perf][C++] Bulk-copy contiguous BOUNDARY pages in the aligned reader #1075

Open

Description

@ColinLeeo

Problem

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.

  • Add Filter::is_contiguous_time_filter() (default false; TimeBetween returns
    !not_).
  • Let can_bulk accept such BOUNDARY pages when no value column has nulls.
  • Discrete filters (TimeIn, NOT BETWEEN) keep the slow path.

Implemented in #1072; 1-week wide-table query 1.63s -> ~1.05s.

Related: #1072

Activity

  1. added this to the 2.5.1 milestone on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions