4 ms·
> The query optimizer knows how many items are in each index, but has no advance idea how many items will be in the result of a JOIN. Query optimizers definite
by Sesse__ 1y ago
> The query optimizer knows how many items are in each index, but has no advance idea how many items will be in the result of a JOIN.
Query optimizers definitely try to estimate cardinalities of joins. It's a really, really hard problem, but the typical estimate is _much_ better than “eh, no idea”.