Every bad execution plan you’ve ever debugged traces back to the same root cause. The optimizer made a wrong guess about how many rows an operation would return ..and built an entire plan on top of that wrong number.
That number is called cardinality. It’s the estimated row count for each operation in your plan. Get it right and the optimizer picks ...