pub struct PlanCostBreakdown {
pub estimated_rows: u64,
pub cost: u64,
pub cpu: u64,
pub random_io: u64,
pub sequential_io: u64,
pub output_rows: u64,
}Expand description
Cardinality and unweighted logical work, plus the weighted scalar total.
CPU work is the scalar normalization unit. Random/sequential work describes access patterns, not physical file pages; output work counts produced rows.
Fields§
§estimated_rows: u64§cost: u64§cpu: u64§random_io: u64§sequential_io: u64§output_rows: u64Implementations§
Source§impl PlanCostBreakdown
impl PlanCostBreakdown
pub fn with_cardinality_floor(self) -> PlanCostBreakdown
pub fn new( estimated_rows: u64, cpu: u64, random_io: u64, sequential_io: u64, output_rows: u64, ) -> PlanCostBreakdown
Sourcepub fn score_with_weights(self, weights: PlanCostWeights) -> PlanCost
pub fn score_with_weights(self, weights: PlanCostWeights) -> PlanCost
Re-scores retained raw work without changing cardinality or the stored engine-default total. Intended for offline qualification and fitting.
pub fn from_scalar(cost: PlanCost) -> PlanCostBreakdown
pub fn with_cpu( self, estimated_rows: u64, cpu: u64, output_rows: u64, ) -> PlanCostBreakdown
pub fn with_random_io( self, estimated_rows: u64, random_io: u64, output_rows: u64, ) -> PlanCostBreakdown
pub fn combine_with_cpu( left: PlanCostBreakdown, right: PlanCostBreakdown, estimated_rows: u64, cpu: u64, output_rows: u64, ) -> PlanCostBreakdown
pub fn as_plan_cost(self) -> PlanCost
Trait Implementations§
Source§impl Clone for PlanCostBreakdown
impl Clone for PlanCostBreakdown
Source§fn clone(&self) -> PlanCostBreakdown
fn clone(&self) -> PlanCostBreakdown
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PlanCostBreakdown
Source§impl Debug for PlanCostBreakdown
impl Debug for PlanCostBreakdown
impl Eq for PlanCostBreakdown
Source§impl PartialEq for PlanCostBreakdown
impl PartialEq for PlanCostBreakdown
impl StructuralPartialEq for PlanCostBreakdown
Auto Trait Implementations§
impl Forget for PlanCostBreakdown
impl Freeze for PlanCostBreakdown
impl Move for PlanCostBreakdown
impl RefUnwindSafe for PlanCostBreakdown
impl Send for PlanCostBreakdown
impl Sync for PlanCostBreakdown
impl Unpin for PlanCostBreakdown
impl UnsafeUnpin for PlanCostBreakdown
impl UnwindSafe for PlanCostBreakdown
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