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%.
| Statistic | What it tells the optimizer |
|---|---|
| Label cardinality | How many nodes have this label |
| Property histograms | Distribution of values for range predicates |
| Degree stats | How many edges per node (affects traversal cost) |
| Distinct counts | Selectivity of equality predicates |
Structs§
- Column
Statistics - Detailed statistics about a property’s values - min, max, histogram, null ratio.
- Edge
Type Statistics - 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.
- Histogram
Bucket - One slice of the value distribution - a range with its row count.
- Index
Statistics - Cost estimates for different index access patterns.
- Label
Statistics - Statistics for nodes with a particular label (like “Person” or “Company”).
- Predicate
Statistics - Statistics for a single predicate (like
:knowsor:name). - RdfStatistics
- Everything the SPARQL optimizer knows about your RDF data.
- RdfStatistics
Collector - Streams triples through to build RDF statistics automatically.
- Statistics
- Everything the optimizer knows about the data - cardinalities, distributions, degrees.
Enums§
- Triple
Position - Which position in a triple pattern - subject, predicate, or object.
Type Aliases§
- Property
Key - A property key identifier.
- Table
Statistics - Alias for table statistics (used in relational contexts).