pub struct IndexStats {
pub predicate_counts: RwLock<HashMap<String, usize>>,
pub total_triples: AtomicUsize,
pub subject_cardinality: RwLock<HashMap<String, usize>>,
pub object_cardinality: RwLock<HashMap<String, usize>>,
pub join_selectivity_cache: RwLock<HashMap<String, f64>>,
/* private fields */
}
Expand description
Extended index statistics for pattern optimization
Fields§
§predicate_counts: RwLock<HashMap<String, usize>>
Predicate occurrence counts
total_triples: AtomicUsize
Total number of triples
subject_cardinality: RwLock<HashMap<String, usize>>
Subject cardinality estimates
object_cardinality: RwLock<HashMap<String, usize>>
Object cardinality estimates
join_selectivity_cache: RwLock<HashMap<String, f64>>
Join selectivity cache
Implementations§
Source§impl IndexStats
impl IndexStats
Sourcepub fn update_predicate_count(&self, predicate: &str, count: usize)
pub fn update_predicate_count(&self, predicate: &str, count: usize)
Update predicate count
Sourcepub fn set_total_triples(&self, count: usize)
pub fn set_total_triples(&self, count: usize)
Set total triples
Sourcepub fn update_subject_cardinality(&self, predicate: &str, cardinality: usize)
pub fn update_subject_cardinality(&self, predicate: &str, cardinality: usize)
Update subject cardinality estimate
Sourcepub fn update_object_cardinality(&self, predicate: &str, cardinality: usize)
pub fn update_object_cardinality(&self, predicate: &str, cardinality: usize)
Update object cardinality estimate
Sourcepub fn cache_join_selectivity(&self, pattern_pair: &str, selectivity: f64)
pub fn cache_join_selectivity(&self, pattern_pair: &str, selectivity: f64)
Cache join selectivity
Sourcepub fn get_join_selectivity(&self, pattern_pair: &str) -> Option<f64>
pub fn get_join_selectivity(&self, pattern_pair: &str) -> Option<f64>
Get cached join selectivity
Trait Implementations§
Source§impl Debug for IndexStats
impl Debug for IndexStats
Source§impl Default for IndexStats
impl Default for IndexStats
Source§fn default() -> IndexStats
fn default() -> IndexStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for IndexStats
impl RefUnwindSafe for IndexStats
impl Send for IndexStats
impl Sync for IndexStats
impl Unpin for IndexStats
impl UnwindSafe for IndexStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more