pub struct ExplainPlan {
pub node_type: String,
pub parent_relationship: Option<String>,
pub parallel_aware: bool,
pub async_capable: bool,
pub startup_cost: f64,
pub total_cost: f64,
pub plan_rows: u64,
pub plan_width: u64,
pub plans: Vec<ExplainPlan>,
}Expand description
Recursive struct which describes the plan of a query
Fields§
§node_type: StringThe type of the plan node (e.g., “Seq Scan”, “Nested Loop”, “Hash Join”). Indicates the operation performed at this step in the query execution plan.
parent_relationship: Option<String>The relationship of this node to its parent in the plan tree. Common values include:
- “Outer”: This node is the outer input to a join (e.g., Nested Loop).
- “Inner”: This node is the inner input to a join.
- “Subquery”: This node is part of a subquery.
- “InitPlan”, “SubPlan”, “Member”: Special plan node roles.
May be None for root nodes or when not applicable.
parallel_aware: boolIndicates whether the plan node is aware of parallel query execution. If true, the node may participate in or benefit from parallelism.
async_capable: boolIndicates whether the node supports asynchronous execution. Async-capable nodes can execute operations concurrently with others, improving performance in some plans (especially with I/O or remote sources).
startup_cost: f64The estimated cost of starting this plan node. This typically includes one-time setup costs, like initializing data structures.
total_cost: f64The estimated total cost of fully executing this plan node, including startup and all tuple processing.
plan_rows: u64The estimated number of rows this plan node will output. This is a planner estimate, not an actual runtime value.
plan_width: u64The estimated average width (in bytes) of each row produced by this node. Useful for understanding memory and I/O implications.
plans: Vec<ExplainPlan>Child plan nodes that this node depends on or drives. For example, a join node will typically have two child plans (inner and outer).
Trait Implementations§
Source§impl Debug for ExplainPlan
impl Debug for ExplainPlan
Source§impl<'de> Deserialize<'de> for ExplainPlan
impl<'de> Deserialize<'de> for ExplainPlan
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>,
Auto Trait Implementations§
impl Freeze for ExplainPlan
impl RefUnwindSafe for ExplainPlan
impl Send for ExplainPlan
impl Sync for ExplainPlan
impl Unpin for ExplainPlan
impl UnwindSafe for ExplainPlan
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q> ExplainWrapped for Q
impl<Q> ExplainWrapped for Q
Source§fn wrap_explain(&self) -> Explain<&Q>
fn wrap_explain(&self) -> Explain<&Q>
EXPLAIN wrapper, allowing it to be analyzed
using Explain::explain(). Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more