pub const FETCH_ONCE_MATCHED_BOUND_EQUIV_MILLI: u64 = 1_200;Expand description
Cost of one row in the fetch-once trigger’s per-page price when the matched count is the unknown-domain fallback rather than an estimate, in milli-rows.
probe_broadcast_price returns the whole arm as the matched count when the
probe’s join-key domain is unknown — a scan with an unbound predicate, such
as ?s ?p ?o, has no per-predicate subject sketch to consult. That number
is an upper bound that holds for every list, so it says nothing about
this page’s list. Charging it the full
FETCH_ONCE_MATCHED_ROW_EQUIV_MILLI premium lets the bound alone reach
the build bar — the premium and FETCH_ONCE_MARGIN_MILLI are both 1400 —
so a single seek tips a 16-key probe into a whole-store drain.
This rate keeps the real per-row overhead (a bound row still crosses the wire and is assembled) while leaving headroom below the margin: one page of a degenerate match prices at 1.2× the arm, under the 1.4× bar, so it stays per-page; two pages price at 2.4× and build, which is the crossover a whole-read-per-page road actually has. The value sits in the lower half of the measured 1.15–1.40 matched-row band.
A known domain whose list covers it keeps the full premium: there the saturation is exact (the push really does return every row), so the whole read is the cheaper road and the bound rate must not suppress it. Only the unknown-domain fallback takes this rate.
Keep this strictly below FETCH_ONCE_MARGIN_MILLI. That gap is the
only thing stopping a vacuous bound from ordering a build. A gap of 100
milli-rows is too thin: a one-page build then needs a key list worth a
tenth of the arm in seeks, which a page-sized list can reach on a large
arm. The 200-point gap here keeps the one-page tipping point far above
waratah_stats::PUSHDOWN_TERMS_LIMIT on corpus-scale arms, so a page
cannot hold enough keys to tip a one-page degenerate match into a build.