pub struct BitmapScanStats {
pub candidate_tids: u64,
pub rows_returned: u64,
pub pages_touched: u64,
}Expand description
Summary statistics the bitmap scan returns alongside its
output. Useful for EXPLAIN ANALYZE-style diagnostics and
for the planner’s feedback loop when adjusting cost
estimates based on actual selectivity.
Fields§
§candidate_tids: u64Total candidate TIDs the bitmap contained before fetching.
rows_returned: u64Rows actually returned (candidates minus tombstones).
pages_touched: u64Distinct pages touched during the scan. A good proxy for physical I/O: n pages × buffer-pool-hit ratio.
Implementations§
Source§impl BitmapScanStats
impl BitmapScanStats
Sourcepub fn survival_ratio(&self) -> f64
pub fn survival_ratio(&self) -> f64
Returns the fraction of candidates that survived the tombstone check. Values near 1.0 mean the bitmap is well-pruned; values near 0.0 mean the index was stale and VACUUM should run.
Trait Implementations§
Source§impl Clone for BitmapScanStats
impl Clone for BitmapScanStats
Source§fn clone(&self) -> BitmapScanStats
fn clone(&self) -> BitmapScanStats
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 moreSource§impl Debug for BitmapScanStats
impl Debug for BitmapScanStats
Source§impl Default for BitmapScanStats
impl Default for BitmapScanStats
Source§fn default() -> BitmapScanStats
fn default() -> BitmapScanStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BitmapScanStats
impl RefUnwindSafe for BitmapScanStats
impl Send for BitmapScanStats
impl Sync for BitmapScanStats
impl Unpin for BitmapScanStats
impl UnsafeUnpin for BitmapScanStats
impl UnwindSafe for BitmapScanStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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