pub struct StaticCostModel;Expand description
Static, row-count-aware cost model for logical plans.
Walks every node in the plan and accumulates cost estimates based on
operator type and the node’s estimated_rows field. When estimated_rows
is None a conservative default of 10 000 rows is assumed.
§Per-node coefficients
| Operator | CPU (ns/row) | Memory (B/row) | Network (B/row) |
|---|---|---|---|
| Scan | 10 | 64 | 0 |
| Filter | 5 | 0 | 0 |
| Project | 2 | 0 | 0 |
| Aggregate | 50 | 200 | 0 |
| Join | 100 | 100 | 0 |
| Exchange | 20 | 0 | 200 |
| Other/Window | 15 | 64 | 0 |
These figures are deliberately simple and tunable; their absolute values are less important than their relative ordering (Aggregate > Join > …).
Trait Implementations§
Source§impl CostModel for StaticCostModel
impl CostModel for StaticCostModel
Auto Trait Implementations§
impl Freeze for StaticCostModel
impl RefUnwindSafe for StaticCostModel
impl Send for StaticCostModel
impl Sync for StaticCostModel
impl Unpin for StaticCostModel
impl UnsafeUnpin for StaticCostModel
impl UnwindSafe for StaticCostModel
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request