Skip to main content

Module pruning

Module pruning 

Source
Expand description

Multi-level segment pruning pipeline.

Eliminates segments from query processing before any data is decoded:

  1. Bloom pruning — Exclude segments that cannot contain the series key
  2. Stats pruning — Exclude segments where column statistics exclude the predicate

Time and tag-index pruning happen one level up, in Chronix::prune_segments, where the candidate set is already scoped to one measurement: the catalog entry carries min_timestamp/max_timestamp, so a separate time index answered nothing the catalog could not.

Every level here may only ever fail towards more work. A segment with no bloom, or with no statistics for the filtered tag, is kept — both structures are derived from a segment’s sidecar and can lag the catalog, and pruning what has not been seen loses rows with no error anywhere.

Structs§

PrunedSegment
A segment that survived pruning.
PruningResult
Result of the pruning pipeline: surviving segment entries and statistics.
PruningStats
Statistics about segment pruning during query execution.

Functions§

prune_entries
Prune a pre-filtered set of segment entries through bloom and stats levels.