pub struct ExclRangeIndex {
pub column_position: usize,
pub map: PersistentBTreeMap<(i128, u8), Vec<RowLocator>>,
}Expand description
v7.39 (round 215) — a per-table range-exclusion index: an incrementally
maintained map from a range column’s lower-bound key
(range_excl_index_key) to the physical row locators carrying that
bound. Lets EXCLUDE enforcement find the few candidate rows a new range
might overlap in O(log n) instead of scanning every row (measured O(N²),
r213). Because the stored ranges under a valid EXCLUDE (col WITH &&)
are pairwise disjoint, a candidate overlaps only its predecessor or the
successors whose lower bound precedes its upper — a handful of probes.
NOT persisted: rebuilt from the (persisted) exclusion constraints + rows
on catalog load, exactly like BRIN re-derives. Backed by a
PersistentBTreeMap so Table::clone (the per-write snapshot) stays
O(1). Locators to tombstoned rows are left in place and filtered by the
consumer via is_deleted() at query time — the established index pattern.
Fields§
§column_position: usizeThe constrained range column’s position in the table.
map: PersistentBTreeMap<(i128, u8), Vec<RowLocator>>Lower-bound key → row locators. A key maps to a Vec because a
tombstoned-then-reinserted bound can transiently collide; live rows
under the constraint are disjoint so each key has one live locator.
Trait Implementations§
Source§impl Clone for ExclRangeIndex
impl Clone for ExclRangeIndex
Source§fn clone(&self) -> ExclRangeIndex
fn clone(&self) -> ExclRangeIndex
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more