Database statistics
Collected histograms, distribution data, and cardinality information over columns that the optimizer uses to plan queries.
The database gathers statistics by sampling or scanning tables — distinct value counts, min/max bounds, distribution across value ranges. With this data, the optimizer can estimate how many rows will satisfy a predicate. Stale or missing statistics lead to bad plans.
Most databases have ANALYZE commands to refresh statistics. Periodic refreshes on large tables are critical for sustained performance.