Optimizer choices start from small named statistics.

highlighted = computed this step

Start with table stats

The choice starts from tiny named table statistics, not a timed run.

stats first\text{stats first}

Read row counts

The left table has 12 rows and the right table has 8 rows.

left rows=12\text{left rows}=12

Optimizer-choice examples are named toy estimate-model outputs; they are not benchmark results, database-product claims, hardware claims, or real speed predictions.

Start with table stats: table statstablerolerowCountdistinctKeysOrdersleft_after_filter_input126Customersright_join_input88 filter estimatelabelinputRowsselectivityestimatedRowsstatus filter121/43 plan estimate rowsplanformulaleft/buildright/probeestimatedWorkchosennested_loop_joinfiltered_left_rows * right_rows3824nohash_joinbuild_rows + probe_rows8311yes estimate factsfactvaluemodelNametoy_optimizer_estimate_v1leftRows12rightRows8selectivity1/4filteredRows3nestedLoopWork24hashJoinWork11chosenPlanhash_joinrealSpeedClaimnoproductClaimnorequiresBenchmarkForSpeedyes

Keep the model visible

The facts table names the toy estimate model before any choice is trusted.

named model output\text{named model output}

Summary

These are estimate inputs, not product measurements.

not a benchmark\text{not a benchmark}