Skip to main content

PlanSignature

Struct PlanSignature 

Source
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

Source

pub fn new() -> Self

Source

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.

Source

pub fn totals(&mut self, nodes: usize, relationships: usize)

Source

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).

Source

pub fn relationship_type(&mut self, rel_type: &str, relationships: usize)

Source

pub fn node_distinct(&mut self, label: &str, property: &str, distinct: usize)

Source

pub fn relationship_distinct( &mut self, rel_type: &str, property: &str, distinct: usize, )

Source

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.

Source

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.

Source

pub fn finish(&self) -> u64

Trait Implementations§

Source§

impl Default for PlanSignature

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.