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 planproject namerows 2nested loop joinrows 2scan Studentsrows 3filter course eq DBrows 2scan Enrollrows 3 resultnameAnnBo

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}