Skip to main content

OptimizerConfig

Struct OptimizerConfig 

Source
#[non_exhaustive]
pub struct OptimizerConfig { pub dp_threshold: usize, pub index_heat_threshold: f32, pub enable_pushdown: bool, pub default_filter_selectivity: f64, pub transfer_cost_multiplier: f64, pub default_bytes_per_row: u64, }
Expand description

Configuration for query optimization.

Controls optimizer behavior including thresholds for algorithm selection and feature toggles.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§dp_threshold: usize

Maximum number of relations for exhaustive dynamic programming.

When a query involves more relations than this threshold, the optimizer switches to a greedy algorithm for join ordering to avoid exponential time complexity. Default: 10 relations.

§index_heat_threshold: f32

Heat threshold for recommending index creation.

Relations with access heat above this threshold are candidates for index building to accelerate future queries. Default: 0.7.

§enable_pushdown: bool

Enable predicate pushdown optimization.

When enabled, filter predicates are pushed down through projections and joins to be applied as early as possible. Default: true.

§default_filter_selectivity: f64

Default selectivity for filters when no statistics are available.

Used as a fallback when column statistics cannot provide a better estimate. Default: 0.1 (10% selectivity).

§transfer_cost_multiplier: f64

Cost multiplier for GPU-to-host data transfers.

Transfers are expensive operations; this multiplier reflects the relative cost compared to local GPU operations. Default: 100.0.

§default_bytes_per_row: u64

Bytes per row used for GPU memory estimation when schema is unknown.

Default: 32 bytes (assumes 4 columns at 8 bytes each on average).

Trait Implementations§

Source§

impl Clone for OptimizerConfig

Source§

fn clone(&self) -> OptimizerConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OptimizerConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OptimizerConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,