pub enum Stage {
Scan {
table: String,
binding: String,
rows: usize,
},
Join {
kind: JoinKind,
table: String,
binding: String,
strategy: Strategy,
keys: usize,
left_rows: usize,
right_rows: usize,
out_rows: usize,
early_stopped: bool,
post_filter_removed: Option<usize>,
},
Filter {
in_rows: usize,
out_rows: usize,
},
Project {
columns: usize,
out_rows: usize,
},
Distinct {
in_rows: usize,
out_rows: usize,
},
Sort {
keys: usize,
rows: usize,
},
Prefilter {
binding: String,
predicates: usize,
in_rows: usize,
out_rows: usize,
},
Limit {
limit: Option<usize>,
offset: Option<usize>,
in_rows: usize,
out_rows: usize,
},
}Expand description
One stage of the pipeline that ran.
Variants§
Scan
A base relation was materialised.
Fields
Join
Two inputs were joined.
Fields
keys: usizeEquality key pairs the planner could PROVE usable. Zero means the hash path was unavailable, which is the single most useful number in the plan when a join is unexpectedly slow.
post_filter_removed: Option<usize>Rows this join produced and then discarded because the WHERE
clause was evaluated inside it. None means the filter ran as a
separate stage.
Reported separately from the join’s own row count precisely so the
two stay distinguishable: an ON predicate and a post-join
WHERE predicate mean different things, and the plan should not
blur them just because one loop evaluates both.
Filter
A WHERE clause was applied.
Project
The select list was evaluated.
Distinct
DISTINCT removed duplicates.
Sort
ORDER BY sorted the rows.
Prefilter
A WHERE conjunct was pre-applied to a base relation before the join.
The original WHERE still runs afterwards — this is a copy, not a
move, which is what makes it safe for every join type.
Limit
LIMIT / OFFSET were applied.
Trait Implementations§
impl Eq for Stage
impl StructuralPartialEq for Stage
Auto Trait Implementations§
impl Freeze for Stage
impl RefUnwindSafe for Stage
impl Send for Stage
impl Sync for Stage
impl Unpin for Stage
impl UnsafeUnpin for Stage
impl UnwindSafe for Stage
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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