pub struct OptimizedExecutor { /* private fields */ }Expand description
Optimized query executor with cost-based planning
Implementations§
Source§impl OptimizedExecutor
impl OptimizedExecutor
Sourcepub fn with_cost_model(cost_model: CostModel) -> Self
pub fn with_cost_model(cost_model: CostModel) -> Self
Create with custom cost model
Sourcepub fn with_cardinality_tracker(tracker: Arc<CardinalityTracker>) -> Self
pub fn with_cardinality_tracker(tracker: Arc<CardinalityTracker>) -> Self
Create with shared cardinality tracker (for integration with ingestion)
Sourcepub fn set_embedding_provider(&mut self, provider: Arc<dyn EmbeddingProvider>)
pub fn set_embedding_provider(&mut self, provider: Arc<dyn EmbeddingProvider>)
Set embedding provider for vector search
Sourcepub fn with_embedding_provider(
self,
provider: Arc<dyn EmbeddingProvider>,
) -> Self
pub fn with_embedding_provider( self, provider: Arc<dyn EmbeddingProvider>, ) -> Self
Create with embedding provider
Sourcepub fn cardinality_tracker(&self) -> Arc<CardinalityTracker>
pub fn cardinality_tracker(&self) -> Arc<CardinalityTracker>
Get the cardinality tracker for external updates (e.g., on INSERT)
Sourcepub fn update_table_stats(&mut self, table: &str, stats: TableStats)
pub fn update_table_stats(&mut self, table: &str, stats: TableStats)
Update table statistics (call periodically or on schema change)
Sourcepub fn refresh_stats_from_tracker(&mut self, table: &str)
pub fn refresh_stats_from_tracker(&mut self, table: &str)
Refresh stats from cardinality tracker
Syncs real-time HLL estimates to the static stats cache.
Sourcepub fn update_cardinality_hint(
&mut self,
table: &str,
column: &str,
cardinality: usize,
_source: CardinalitySource,
)
pub fn update_cardinality_hint( &mut self, table: &str, column: &str, cardinality: usize, _source: CardinalitySource, )
Update column cardinality from HyperLogLog
Sourcepub fn plan_select(
&self,
select: &SelectQuery,
_catalog: &Catalog,
) -> Result<OptimizedQueryPlan>
pub fn plan_select( &self, select: &SelectQuery, _catalog: &Catalog, ) -> Result<OptimizedQueryPlan>
Plan a SELECT query with cost-based optimization
Sourcepub fn execute<S: StorageBackend>(
&self,
plan: &OptimizedQueryPlan,
storage: &S,
) -> Result<SochResult>
pub fn execute<S: StorageBackend>( &self, plan: &OptimizedQueryPlan, storage: &S, ) -> Result<SochResult>
Execute an optimized query plan against a storage backend
This is the key method that wires the optimizer output to actual storage. It interprets each ExecutionStep and calls the appropriate storage method.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OptimizedExecutor
impl !RefUnwindSafe for OptimizedExecutor
impl Send for OptimizedExecutor
impl Sync for OptimizedExecutor
impl Unpin for OptimizedExecutor
impl !UnwindSafe for OptimizedExecutor
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