Skip to main content

explain_cardinality

Function explain_cardinality 

Source
pub fn explain_cardinality<R: TryRead>(
    snap: &R,
    tenant: TenantId,
    labels: &[String],
    where_: &Expr,
) -> Result<Option<u64>, QueryError>
Expand description

Exact most-selective index-leaf cardinality for a predicate, for EXPLAIN . Uses the maintained derived posting cardinality when the view carries it, so EXPLAIN need not materialize candidates. Returns None when no leaf is index-eligible (a full scan).

ยงErrors

Propagates storage/engine read errors from the estimate lookup.