Slicing Encoded Streams Efficiently in Velox Nimble
Introduction
On serving paths, indexed reads such as prefix scans often need a small row range from a much larger stripe. Fetching the full stripe creates row-level over-fetch: it wastes network bandwidth in NIC-bound workloads, while decoding it into Velox vectors, selecting rows, and serializing again incurs significant CPU, allocation, and data-copy costs.
Nimble's
StreamSlicer
leverages white-box knowledge of each stream's encoding structure. It maps the
requested top-level row range to the corresponding range in each nested stream
and slices encoded bytes directly. For a compressed chunk, it decompresses the
chunk before applying encoding-level slicing.
This article explains how StreamSlicer maps nested row ranges and slices
encoded streams without decoding and re-encoding the full batch.







