pub struct AdaptiveConfig {
pub enabled: bool,
pub threshold: f64,
pub min_rows: u64,
pub max_reoptimizations: usize,
}Expand description
Configuration for adaptive query execution.
Adaptive execution monitors actual row counts during query processing and can trigger re-optimization when estimates are significantly wrong.
Fields§
§enabled: boolWhether adaptive execution is enabled.
threshold: f64Deviation threshold that triggers re-optimization.
A value of 3.0 means re-optimization is triggered when actual cardinality is more than 3x or less than 1/3x the estimated value.
min_rows: u64Minimum number of rows before considering re-optimization.
Helps avoid thrashing on small result sets.
max_reoptimizations: usizeMaximum number of re-optimizations allowed per query.
Implementations§
Source§impl AdaptiveConfig
impl AdaptiveConfig
Sourcepub fn with_threshold(self, threshold: f64) -> Self
pub fn with_threshold(self, threshold: f64) -> Self
Sets the deviation threshold.
Sourcepub fn with_min_rows(self, min_rows: u64) -> Self
pub fn with_min_rows(self, min_rows: u64) -> Self
Sets the minimum rows before re-optimization.
Sourcepub fn with_max_reoptimizations(self, max: usize) -> Self
pub fn with_max_reoptimizations(self, max: usize) -> Self
Sets the maximum number of re-optimizations.
Trait Implementations§
Source§impl Clone for AdaptiveConfig
impl Clone for AdaptiveConfig
Source§fn clone(&self) -> AdaptiveConfig
fn clone(&self) -> AdaptiveConfig
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 moreSource§impl Debug for AdaptiveConfig
impl Debug for AdaptiveConfig
Auto Trait Implementations§
impl Freeze for AdaptiveConfig
impl RefUnwindSafe for AdaptiveConfig
impl Send for AdaptiveConfig
impl Sync for AdaptiveConfig
impl Unpin for AdaptiveConfig
impl UnwindSafe for AdaptiveConfig
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