Selective equality costing validation
With empty statistics, three selective equality predicates can lose to a label scan after intersection children are costed serially. Both candidates survive exploration. The comparison must include the label bitmap, graph-row hydration, row construction, and residual evaluation.Complete cost comparison
The synthetic fixture uses three indexed equalities, 1,000 estimated scan rows, and 10 estimated rows per equality. Values below are estimated microseconds, not measured query latency.
The fixed label candidate includes 5,050 bitmap setup, 1,000 bitmap decode,
10,000 graph-row read/decode, 1,000 row construction, and 1,000 residual
evaluation. Including projection, the scan alternative costs 19,050.
For a shared equality intersected with a two-value equality union, factoring
out the shared lookup costs 6,020. Distributing and charging that lookup in
every branch costs 20,320, incorrectly favoring the 18,050 scan alternative.