Expand description
Chunk selection by time range.
A series’ chunks are stored in ascending time order, so a query range can be
turned into a contiguous slice of the chunk list without decoding anything:
binary search for the first chunk whose max_time reaches the range start,
and stop at the first chunk that begins after the range end.
This is the block-internal optimisation the query layer relies on; deciding
which range a PromQL expression needs (e.g. the extra five minutes for
rate(...[5m])) belongs to the query layer, not here.
Functions§
- chunk_
index_ range - Index range of the chunks of a series that can hold samples in
range. - chunks_
in_ range - The chunks of
chunksthat can hold samples inrange, in time order.