Skip to main content

Module statistics

Module statistics 

Source
Expand description

Statistics for cost-based query optimization.

The query optimizer uses these statistics to pick the best execution plan. Without stats, it has to guess - with stats, it knows that filtering by “status = ‘active’” returns 90% of rows while “label = ‘Admin’” returns 0.1%.

StatisticWhat it tells the optimizer
Label cardinalityHow many nodes have this label
Property histogramsDistribution of values for range predicates
Degree statsHow many edges per node (affects traversal cost)
Distinct countsSelectivity of equality predicates

Structs§

ColumnStatistics
Detailed statistics about a property’s values - min, max, histogram, null ratio.
EdgeTypeStatistics
Statistics for edges of a particular type (like “KNOWS” or “WORKS_AT”).
Histogram
Divides a column’s value range into buckets of roughly equal row counts.
HistogramBucket
One slice of the value distribution - a range with its row count.
IndexStatistics
Cost estimates for different index access patterns.
LabelStatistics
Statistics for nodes with a particular label (like “Person” or “Company”).
PredicateStatistics
Statistics for a single predicate (like :knows or :name).
RdfStatistics
Everything the SPARQL optimizer knows about your RDF data.
RdfStatisticsCollector
Streams triples through to build RDF statistics automatically.
Statistics
Everything the optimizer knows about the data - cardinalities, distributions, degrees.

Enums§

TriplePosition
Which position in a triple pattern - subject, predicate, or object.

Type Aliases§

PropertyKey
A property key identifier.
TableStatistics
Alias for table statistics (used in relational contexts).