pub struct GraphStatistics { /* private fields */ }Expand description
Graph statistics for query optimization
Collects and maintains statistical information about the RDF graph for use in cost-based query optimization.
Implementations§
Source§impl GraphStatistics
impl GraphStatistics
Sourcepub fn record_insert(&self, triple: &Triple) -> Result<(), OxirsError>
pub fn record_insert(&self, triple: &Triple) -> Result<(), OxirsError>
Update statistics after inserting a triple
Sourcepub fn record_remove(&self, triple: &Triple) -> Result<(), OxirsError>
pub fn record_remove(&self, triple: &Triple) -> Result<(), OxirsError>
Update statistics after removing a triple
Sourcepub fn total_triples(&self) -> u64
pub fn total_triples(&self) -> u64
Get total number of triples
Sourcepub fn get_predicate_stats(
&self,
predicate: &str,
) -> Option<PredicateStatistics>
pub fn get_predicate_stats( &self, predicate: &str, ) -> Option<PredicateStatistics>
Get statistics for a specific predicate
Sourcepub fn estimate_pattern_cardinality(&self, pattern: &TriplePattern) -> u64
pub fn estimate_pattern_cardinality(&self, pattern: &TriplePattern) -> u64
Estimate cardinality for a triple pattern
Sourcepub fn estimate_algebra_pattern_cardinality(
&self,
pattern: &AlgebraTriplePattern,
) -> u64
pub fn estimate_algebra_pattern_cardinality( &self, pattern: &AlgebraTriplePattern, ) -> u64
Estimate cardinality for algebra triple pattern
Sourcepub fn record_query_execution(
&self,
stats: QueryExecutionStats,
) -> Result<(), OxirsError>
pub fn record_query_execution( &self, stats: QueryExecutionStats, ) -> Result<(), OxirsError>
Record actual query execution for adaptive learning
Sourcepub fn get_learned_selectivity(&self, pattern_signature: &str) -> Option<f64>
pub fn get_learned_selectivity(&self, pattern_signature: &str) -> Option<f64>
Get learned selectivity for a pattern
Sourcepub fn export_to_json(&self) -> Result<String, OxirsError>
pub fn export_to_json(&self) -> Result<String, OxirsError>
Export statistics to JSON for persistence
Sourcepub fn import_from_json(&self, json: &str) -> Result<(), OxirsError>
pub fn import_from_json(&self, json: &str) -> Result<(), OxirsError>
Import statistics from JSON
Sourcepub fn recompute_from_triples(
&self,
triples: &[Triple],
) -> Result<(), OxirsError>
pub fn recompute_from_triples( &self, triples: &[Triple], ) -> Result<(), OxirsError>
Full statistics recomputation (expensive operation)
Sourcepub fn summary(&self) -> StatisticsSummary
pub fn summary(&self) -> StatisticsSummary
Get all statistics as a summary
Trait Implementations§
Source§impl Clone for GraphStatistics
impl Clone for GraphStatistics
Source§fn clone(&self) -> GraphStatistics
fn clone(&self) -> GraphStatistics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GraphStatistics
impl RefUnwindSafe for GraphStatistics
impl Send for GraphStatistics
impl Sync for GraphStatistics
impl Unpin for GraphStatistics
impl UnsafeUnpin for GraphStatistics
impl UnwindSafe for GraphStatistics
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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