pub struct MemoizeCache {
pub group_maps: BTreeMap<String, Option<Rc<GroupMap>>>,
pub expr_plans: BTreeMap<usize, ExprPlan>,
pub in_sets: BTreeMap<usize, Option<InListSetEntry>>,
pub has_subquery: BTreeMap<usize, bool>,
pub hit_count: u64,
pub miss_count: u64,
/* private fields */
}Fields§
§group_maps: BTreeMap<String, Option<Rc<GroupMap>>>v7.29 (round-22 phase 3) - batch-evaluated correlated scalar subqueries: subquery repr -> Some((outer column, key -> value map built in ONE pass)) or None when the shape can’t batch (so we don’t re-analyse it per row). Turns 23.5k per-group executions into one grouped scan + 23.5k lookups.
expr_plans: BTreeMap<usize, ExprPlan>v7.29 (3c) - host-expression ptr -> (subquery count, plan).
in_sets: BTreeMap<usize, Option<InListSetEntry>>v7.30.2 (mailrs round-25) - InList node ptr -> membership set
for large all-literal IN lists, built once per row loop.
Turns the O(rows × list) membership scan into
O(rows × log list). None = analysed, not eligible.
has_subquery: BTreeMap<usize, bool>v7.30.2 (mailrs round-25) - host-expression ptr -> “contains a subquery node”. The walk is O(tree) and a materialised IN list makes the tree huge — caching it makes the per-row dispatch O(log n) instead of O(24k list elements).
hit_count: u64§miss_count: u64Implementations§
Source§impl MemoizeCache
impl MemoizeCache
pub fn new() -> Self
pub const fn with_max_entries(self, n: usize) -> Self
pub const fn with_max_bytes(self, b: usize) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for MemoizeCache
impl Clone for MemoizeCache
Source§fn clone(&self) -> MemoizeCache
fn clone(&self) -> MemoizeCache
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more