pub struct ApproximateRangeStats {
pub bytes: u64,
pub key_count: u64,
}Expand description
Approximate size of a key range, estimated from SST block-index offsets and
the active memtable WITHOUT reading any data block. Returned by
crate::AbstractTree::approximate_range_stats.
Both figures are estimates from the same in-range fraction per source: each overlapping SST’s data-block offsets are interpolated at the range boundaries (block granularity) and that fraction is applied to the SST’s byte span and its entry count, while each memtable contributes its in-range skiplist count and the matching share of its size. Accuracy is typically within ~10-15% on roughly-uniform data; it is intended for query planning (split-point selection, cost-based join ordering), not exact accounting.
Fields§
§bytes: u64Estimated on-disk bytes occupied by the range across all overlapping
SSTs (key + pointer + apportioned blob bytes) plus the active and sealed
memtables’ in-range share. 0 for an empty range.
key_count: u64Estimated number of entry versions in the range: the sum, over each
overlapping SST, of item_count × in-range fraction, plus each
memtable’s in-range skiplist count. 0 for an empty range.
Trait Implementations§
Source§impl Clone for ApproximateRangeStats
impl Clone for ApproximateRangeStats
Source§fn clone(&self) -> ApproximateRangeStats
fn clone(&self) -> ApproximateRangeStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ApproximateRangeStats
Source§impl Debug for ApproximateRangeStats
impl Debug for ApproximateRangeStats
Source§impl Default for ApproximateRangeStats
impl Default for ApproximateRangeStats
Source§fn default() -> ApproximateRangeStats
fn default() -> ApproximateRangeStats
impl Eq for ApproximateRangeStats
Source§impl PartialEq for ApproximateRangeStats
impl PartialEq for ApproximateRangeStats
Source§fn eq(&self, other: &ApproximateRangeStats) -> bool
fn eq(&self, other: &ApproximateRangeStats) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ApproximateRangeStats
Auto Trait Implementations§
impl Freeze for ApproximateRangeStats
impl RefUnwindSafe for ApproximateRangeStats
impl Send for ApproximateRangeStats
impl Sync for ApproximateRangeStats
impl Unpin for ApproximateRangeStats
impl UnsafeUnpin for ApproximateRangeStats
impl UnwindSafe for ApproximateRangeStats
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<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