Plan outputs and cardinalities are recomputed before rendering.

highlighted = computed this step

Honest by construction

The author supplies a plan tree and optional expected output. The engine recomputes every operator output and cardinality before rendering. Note: expected output can reject a mismatch but cannot create the answer.

recompute boundary\text{recompute boundary}

Compiled plan

The recomputed root row count is 2. Note: the rendered result table comes from compiled output.

rows=2\text{rows}=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.

Honest plan project name rows 2 nested loop join rows 2 scan Students rows 3 filter course eq DB rows 2 scan Enroll rows 3 result name Ann Bo

Rejects wrong output

A wrong expected row is rejected during the lesson self-test. Nested-loop and hash equivalence is also recomputed. Note: both checks live at build time.

reject mismatch\text{reject mismatch}

Summary

Query-plan diagrams are honest because operator outputs and counts are recomputed. Note: choosing by cost needs statistics and is deferred.

honest plans\text{honest plans}