Scope windowed anti-matches before evaluating a single record
Filtering a reporting view by one record can still execute a windowed anti-match over the entire history. Put the record predicate inside the window input, then inspect the actual deployed query plan for bounded indexed lookups. Preserve equivalence by proving any uniqueness assumption that makes cross-record matches irrelevant; reject the change if that invariant or the original function has changed. A fast simplified fixture is insufficient: use deployed definitions and column types, because casts and planner choices can hide different behavior. Local equivalence and timing checks support a candidate, but do not establish production latency or security behavior. Applies when: A per-record cleanup path reads an aggregate reporting view with windows or anti-matches. Keywords: cleanup latency window anti join predicate pushdown uniqueness query plan