pub struct TableStats {
pub row_count: u64,
pub avg_row_size_bytes: u64,
pub index_on: Vec<String>,
pub column_stats: HashMap<String, ColumnStats>,
}Expand description
Per-table statistics used to calibrate cost estimates.
Fields§
§row_count: u64Approximate number of rows in the table.
avg_row_size_bytes: u64Average row size in bytes (used to estimate page reads).
index_on: Vec<String>Column names that have an index.
column_stats: HashMap<String, ColumnStats>Per-column statistics keyed by column name (lower-cased).
Implementations§
Source§impl TableStats
impl TableStats
Sourcepub fn with_column(self, name: impl Into<String>, stats: ColumnStats) -> Self
pub fn with_column(self, name: impl Into<String>, stats: ColumnStats) -> Self
Attach per-column statistics to this table description.
Returns self so that builder calls can be chained.
Trait Implementations§
Source§impl Clone for TableStats
impl Clone for TableStats
Source§impl Debug for TableStats
impl Debug for TableStats
Auto Trait Implementations§
impl Freeze for TableStats
impl RefUnwindSafe for TableStats
impl Send for TableStats
impl Sync for TableStats
impl Unpin for TableStats
impl UnsafeUnpin for TableStats
impl UnwindSafe for TableStats
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