pub struct PatternOptimizer { /* private fields */ }
Expand description
Pattern matching optimizer that selects optimal indexes
Implementations§
Source§impl PatternOptimizer
impl PatternOptimizer
Sourcepub fn new(index_stats: Arc<IndexStats>) -> Self
pub fn new(index_stats: Arc<IndexStats>) -> Self
Create a new pattern optimizer
Sourcepub fn optimize_patterns(
&self,
patterns: &[AlgebraTriplePattern],
) -> Result<OptimizedPatternPlan, OxirsError>
pub fn optimize_patterns( &self, patterns: &[AlgebraTriplePattern], ) -> Result<OptimizedPatternPlan, OxirsError>
Optimize a set of triple patterns
Sourcepub fn analyze_pattern(
&self,
pattern: &AlgebraTriplePattern,
) -> Vec<PatternStrategy>
pub fn analyze_pattern( &self, pattern: &AlgebraTriplePattern, ) -> Vec<PatternStrategy>
Analyze a single pattern and generate strategies
Sourcepub fn estimate_join_selectivity(
&self,
left: &AlgebraTriplePattern,
right: &AlgebraTriplePattern,
) -> f64
pub fn estimate_join_selectivity( &self, left: &AlgebraTriplePattern, right: &AlgebraTriplePattern, ) -> f64
Estimate join selectivity between two patterns
Sourcepub fn optimize_filters(
&self,
patterns: &[AlgebraTriplePattern],
filters: &[FilterExpression],
) -> Vec<(usize, Vec<FilterExpression>)>
pub fn optimize_filters( &self, patterns: &[AlgebraTriplePattern], filters: &[FilterExpression], ) -> Vec<(usize, Vec<FilterExpression>)>
Optimize filter expressions and determine pushdown opportunities
Sourcepub fn estimate_filter_selectivity(&self, filter: &FilterExpression) -> f64
pub fn estimate_filter_selectivity(&self, filter: &FilterExpression) -> f64
Estimate filter selectivity
Sourcepub fn get_optimal_index(
&self,
pattern: &ModelTriplePattern,
bound_vars: &HashSet<Variable>,
) -> IndexType
pub fn get_optimal_index( &self, pattern: &ModelTriplePattern, bound_vars: &HashSet<Variable>, ) -> IndexType
Get optimal index type for a pattern execution
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PatternOptimizer
impl RefUnwindSafe for PatternOptimizer
impl Send for PatternOptimizer
impl Sync for PatternOptimizer
impl Unpin for PatternOptimizer
impl UnwindSafe for PatternOptimizer
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