You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(read): the match_scores page reads are O(active scores) — ~1 s per page at 10⁷; an entity-keyed edge projection would bound them #1440
Every per-page results read over match_scores is linear in the tenant's active scores, not in the page size. Measured in-process on DuckDB 2.0.1 / DuckLake with rows in write order (the table declares no order_by), 50-row pages:
statement
2M active scores
8M active scores
rows read
within_groups (/duplicates, /merge-plans)
p50 196 ms
p50 761 ms
all of them
uncertain_page
p50 254 ms
p50 784 ms
the band (~60%)
active_page
p50 245 ms
p50 780 ms
~50% (keyset half)
That's about 100 ms per million active scores, so roughly 1 s per page at 10⁷. Live p3live (780k records) serves /duplicates at p50 1227 / p95 1330 ms and /merge-plans at p50 1761 ms per 50-entity page.
What does not work (measured)
Bounding scored through the page's members (rec_a_key IN (SELECT record_key FROM members)): no gain at either size. A page's members are scattered across the whole key space, so neither the zone maps nor the join filter prune anything.
Sort-on-write by rec_a_key helps active_page only: 245 → 20 ms at 2M and 780 → 23 ms at 8M, measured on a sorted copy. within_groups and uncertain_page stay the same for the same reason. It also needs DuckLake's table-level sort, because upsert_from_scored is a MERGE.
Candidates
An entity-keyed edge projection: write entity_id alongside each within-group edge at reconcile time, sorted by entity_id. within_groups then range-scans by the page's id range, as members already does.
A table-level sort on match_scores (rec_a_key, rec_b_key) for active_page.
A probability-sorted layout (or a band partition) for uncertain_page.
Each needs its own measurement on the same harness before it ships. Done when the three reads are bounded by page size at 10⁷ active scores, or a verdict says why not.
Activity
perf(read): measure the match_scores page reads — linear in active sc…
docs(perf): measure the score page layouts at ten million active edges (