NOTE

MySQL Optimizer Statistics

Cardinality and distribution statistics used for cost-based query-plan selection.

DatabasesCreated Updated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

The optimizer relies on table/index statistics to estimate row counts and selectivities. Bad or stale estimates can lead to an inefficient join order or access path even when suitable indexes exist.

Analyze the plan and estimated versus actual rows before forcing hints. Refresh/update statistics where appropriate, and use histogram/statistics features when skewed distributions make simple cardinality estimates insufficient.

Loading helpful count