pub struct SelectivityConfig {
pub default: f64,
pub equality: f64,
pub inequality: f64,
pub range: f64,
pub string_ops: f64,
pub membership: f64,
pub is_null: f64,
pub is_not_null: f64,
pub distinct_fraction: f64,
}Expand description
Configurable selectivity defaults for cardinality estimation.
Controls the assumed selectivity for various predicate types when histogram or column statistics are unavailable. Adjusting these values can improve plan quality for workloads with known skew.
Fields§
§default: f64Selectivity for unknown predicates (default: 0.1).
equality: f64Selectivity for equality predicates without stats (default: 0.01).
inequality: f64Selectivity for inequality predicates (default: 0.99).
range: f64Selectivity for range predicates without stats (default: 0.33).
string_ops: f64Selectivity for string operations: STARTS WITH, ENDS WITH, CONTAINS, LIKE (default: 0.1).
membership: f64Selectivity for IN membership (default: 0.1).
is_null: f64Selectivity for IS NULL (default: 0.05).
is_not_null: f64Selectivity for IS NOT NULL (default: 0.95).
distinct_fraction: f64Fraction assumed distinct for DISTINCT operations (default: 0.5).
Implementations§
Trait Implementations§
Source§impl Clone for SelectivityConfig
impl Clone for SelectivityConfig
Source§fn clone(&self) -> SelectivityConfig
fn clone(&self) -> SelectivityConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SelectivityConfig
impl Debug for SelectivityConfig
Auto Trait Implementations§
impl Freeze for SelectivityConfig
impl RefUnwindSafe for SelectivityConfig
impl Send for SelectivityConfig
impl Sync for SelectivityConfig
impl Unpin for SelectivityConfig
impl UnwindSafe for SelectivityConfig
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
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>
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>
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