pub struct PlanSignature { /* private fields */ }Expand description
Builds a GraphStats::plan_signature: a hash of every input the
planner reads from the stats, with cardinalities coarsened to
power-of-two buckets. Backends feed it the same items GraphStats
holds, in a deterministic order, without building the maps.
Implementations§
Source§impl PlanSignature
impl PlanSignature
pub fn new() -> Self
Sourcepub fn bucket(count: usize) -> u32
pub fn bucket(count: usize) -> u32
Bucket of a cardinality: 0 for 0, else its bit length (1, 2-3, 4-7, …). Cost estimates within one bucket are within a factor of two of each other.
pub fn totals(&mut self, nodes: usize, relationships: usize)
Sourcepub fn label(&mut self, label: &str, nodes: usize)
pub fn label(&mut self, label: &str, nodes: usize)
A label present in the stats (even with no nodes left: an absent label and an empty one estimate differently).
pub fn relationship_type(&mut self, rel_type: &str, relationships: usize)
pub fn node_distinct(&mut self, label: &str, property: &str, distinct: usize)
pub fn relationship_distinct( &mut self, rel_type: &str, property: &str, distinct: usize, )
Sourcepub fn index(
&mut self,
entity: StoredIndexEntity,
kind: StoredIndexKind,
label: &str,
property: &str,
)
pub fn index( &mut self, entity: StoredIndexEntity, kind: StoredIndexKind, label: &str, property: &str, )
An online range / text / point / vector index scope, as the
*_indexes sets of GraphStats hold them.
Sourcepub fn list_elements(
&mut self,
entity: StoredIndexEntity,
label: &str,
property: &str,
stats: ListElementStats,
)
pub fn list_elements( &mut self, entity: StoredIndexEntity, label: &str, property: &str, stats: ListElementStats, )
A RANGE index scope holding list elements, by the entities one element seek finds on average.
pub fn finish(&self) -> u64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlanSignature
impl RefUnwindSafe for PlanSignature
impl Send for PlanSignature
impl Sync for PlanSignature
impl Unpin for PlanSignature
impl UnsafeUnpin for PlanSignature
impl UnwindSafe for PlanSignature
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