Expected optimizer facts are assertions only.
Honest by construction
Expected optimizer facts are assertions only.
compiler is source of truth \text{compiler is source of truth} compiler is source of truth
Render checked estimates
The real-speed claim flag is no.
speed claim is no \text{speed claim is no} speed claim is no
Optimizer-choice examples are named toy estimate-model outputs; they are not benchmark results, database-product claims, hardware claims, or real speed predictions.
Honest by construction: table stats table role rowCount distinctKeys Orders left_after_filter_input 12 6 Customers right_join_input 8 8
filter estimate label inputRows selectivity estimatedRows status filter 12 1/4 3
plan estimate rows plan formula left/build right/probe estimatedWork chosen nested_loop_join filtered_left_rows * right_rows 3 8 24 no hash_join build_rows + probe_rows 8 3 11 yes
estimate facts fact value modelName toy_optimizer_estimate_v1 leftRows 12 rightRows 8 selectivity 1/4 filteredRows 3 nestedLoopWork 24 hashJoinWork 11 chosenPlan hash_join realSpeedClaim no productClaim no requiresBenchmarkForSpeed yes
Try to tamper
Wrong expected facts, derived sidecars, fractional estimates, missing keys, bools, floats, and unsupported keys fail closed.
tamper rejected \text{tamper rejected} tamper rejected
Summary
The book shows one exact estimate model, not a product optimizer.
scoped estimate model \text{scoped estimate model} scoped estimate model