pub struct QueryHints {
pub join_hints: Vec<JoinHint>,
pub index_hints: Vec<IndexHint>,
pub cardinality_hints: Vec<CardinalityHint>,
pub parallelism_hints: Option<ParallelismHint>,
pub materialization_hints: Vec<MaterializationHint>,
pub timeout_hint: Option<Duration>,
pub memory_hint: Option<MemoryHint>,
pub cache_hints: Option<CacheHint>,
pub join_order_hint: Option<JoinOrderHint>,
pub filter_hints: Vec<FilterHint>,
pub custom_directives: HashMap<String, String>,
}Expand description
Query hints for optimizer guidance
Fields§
§join_hints: Vec<JoinHint>Join algorithm hints
index_hints: Vec<IndexHint>Index usage hints
cardinality_hints: Vec<CardinalityHint>Cardinality override hints
parallelism_hints: Option<ParallelismHint>Parallelism configuration hints
materialization_hints: Vec<MaterializationHint>Materialization strategy hints
timeout_hint: Option<Duration>Query timeout hint
memory_hint: Option<MemoryHint>Memory limit hint
cache_hints: Option<CacheHint>Cache control hints
join_order_hint: Option<JoinOrderHint>Ordering hints for join execution
filter_hints: Vec<FilterHint>Filter pushdown hints
custom_directives: HashMap<String, String>Custom optimizer directives
Implementations§
Source§impl QueryHints
impl QueryHints
Sourcepub fn builder() -> QueryHintsBuilder
pub fn builder() -> QueryHintsBuilder
Create hints builder
Sourcepub fn hint_count(&self) -> usize
pub fn hint_count(&self) -> usize
Get hint count
Sourcepub fn merge(&mut self, other: QueryHints)
pub fn merge(&mut self, other: QueryHints)
Merge hints from another QueryHints instance (other takes precedence)
Sourcepub fn get_join_hint(&self, vars: &[Variable]) -> Option<&JoinHint>
pub fn get_join_hint(&self, vars: &[Variable]) -> Option<&JoinHint>
Get join hint for specific variables
Sourcepub fn get_cardinality_hint(&self, var: &Variable) -> Option<u64>
pub fn get_cardinality_hint(&self, var: &Variable) -> Option<u64>
Get cardinality hint for a variable
Sourcepub fn get_index_hint(&self, pattern_id: &str) -> Option<&IndexHint>
pub fn get_index_hint(&self, pattern_id: &str) -> Option<&IndexHint>
Get index hint for a pattern
Trait Implementations§
Source§impl Clone for QueryHints
impl Clone for QueryHints
Source§fn clone(&self) -> QueryHints
fn clone(&self) -> QueryHints
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 QueryHints
impl Debug for QueryHints
Source§impl Default for QueryHints
impl Default for QueryHints
Source§fn default() -> QueryHints
fn default() -> QueryHints
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for QueryHints
impl<'de> Deserialize<'de> for QueryHints
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QueryHints
impl RefUnwindSafe for QueryHints
impl Send for QueryHints
impl Sync for QueryHints
impl Unpin for QueryHints
impl UnsafeUnpin for QueryHints
impl UnwindSafe for QueryHints
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> 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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.