pub struct Statistics {
pub labels: HashMap<String, LabelStatistics>,
pub edge_types: HashMap<String, EdgeTypeStatistics>,
pub properties: HashMap<PropertyKey, ColumnStatistics>,
pub total_nodes: u64,
pub total_edges: u64,
}Expand description
Statistics for the entire database.
Fields§
§labels: HashMap<String, LabelStatistics>Per-label statistics.
edge_types: HashMap<String, EdgeTypeStatistics>Per-edge-type statistics.
properties: HashMap<PropertyKey, ColumnStatistics>Per-property statistics (across all labels).
total_nodes: u64Total node count.
total_edges: u64Total edge count.
Implementations§
Source§impl Statistics
impl Statistics
Sourcepub fn update_label(&mut self, label: &str, stats: LabelStatistics)
pub fn update_label(&mut self, label: &str, stats: LabelStatistics)
Updates label statistics.
Sourcepub fn update_edge_type(&mut self, edge_type: &str, stats: EdgeTypeStatistics)
pub fn update_edge_type(&mut self, edge_type: &str, stats: EdgeTypeStatistics)
Updates edge type statistics.
Sourcepub fn update_property(&mut self, property: &str, stats: ColumnStatistics)
pub fn update_property(&mut self, property: &str, stats: ColumnStatistics)
Updates property statistics.
Sourcepub fn get_label(&self, label: &str) -> Option<&LabelStatistics>
pub fn get_label(&self, label: &str) -> Option<&LabelStatistics>
Gets label statistics.
Sourcepub fn get_edge_type(&self, edge_type: &str) -> Option<&EdgeTypeStatistics>
pub fn get_edge_type(&self, edge_type: &str) -> Option<&EdgeTypeStatistics>
Gets edge type statistics.
Sourcepub fn get_property(&self, property: &str) -> Option<&ColumnStatistics>
pub fn get_property(&self, property: &str) -> Option<&ColumnStatistics>
Gets property statistics.
Sourcepub fn estimate_label_cardinality(&self, label: &str) -> f64
pub fn estimate_label_cardinality(&self, label: &str) -> f64
Estimates the cardinality of a label scan.
Sourcepub fn estimate_avg_degree(&self, edge_type: &str, outgoing: bool) -> f64
pub fn estimate_avg_degree(&self, edge_type: &str, outgoing: bool) -> f64
Estimates the average degree for an edge type.
Sourcepub fn estimate_equality_selectivity(
&self,
property: &str,
_value: &Value,
) -> f64
pub fn estimate_equality_selectivity( &self, property: &str, _value: &Value, ) -> f64
Estimates selectivity of an equality predicate.
Trait Implementations§
Source§impl Clone for Statistics
impl Clone for Statistics
Source§fn clone(&self) -> Statistics
fn clone(&self) -> Statistics
Returns a duplicate of the value. Read more
1.0.0 · 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 Statistics
impl Debug for Statistics
Source§impl Default for Statistics
impl Default for Statistics
Source§fn default() -> Statistics
fn default() -> Statistics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Statistics
impl RefUnwindSafe for Statistics
impl Send for Statistics
impl Sync for Statistics
impl Unpin for Statistics
impl UnwindSafe for Statistics
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