Skip to main content

Module cardinality

Module cardinality 

Source
Expand description

Cardinality estimation for query optimization.

Estimates the number of rows produced by each operator in a query plan.

§Equi-Depth Histograms

This module provides equi-depth histogram support for accurate selectivity estimation of range predicates. Unlike equi-width histograms that divide the value range into equal-sized buckets, equi-depth histograms divide the data into buckets with approximately equal numbers of rows.

Benefits:

  • Better estimates for skewed data distributions
  • More accurate range selectivity than assuming uniform distribution
  • Adaptive to actual data characteristics

Structs§

CardinalityEstimator
Cardinality estimator.
ColumnStats
Statistics for a column.
EquiDepthHistogram
An equi-depth histogram for selectivity estimation.
HistogramBucket
A bucket in an equi-depth histogram.
TableStats
Statistics for a table/label.