Plan diagrams show mechanisms and exact counts while cost choice is deferred.
highlighted = computed this step
The optimizer is deferred
The diagrams show exact cardinalities and physical mechanisms. They do not choose a winning plan. Note: choosing by cost needs table statistics, which this book defers.
optimizer deferred
Mechanisms shown
The nested-loop root row count is 2 and the hash root row count is 2. Note: both diagrams expose mechanism and exact row counts.
nested loop=2,hash=2
cardinalities are exact counts on these tiny tables; choosing a plan by cost needs statistics and is deferred - no speed/perf claims; nested-loop vs hash is mechanism, not speed.
Cost needs statistics
This engine has exact tiny-table counts, but no table statistics model. Note: cost-based choice belongs outside this book's engine surface.
cost deferred
Summary
Use these plans to read mechanisms and cardinalities, not to rank plans. Note: choosing by cost needs statistics and is deferred.