Repository navigation
perf(read): measure the match_scores page reads — linear in active scores, accepted at current scale (#833) - #1441
Merged
Merged
Conversation
…ores, accepted at current scale (#833) Measured in-process on DuckDB 2.0.1 / DuckLake, with rows in write order (match_scores declares no order_by) and 50-row pages: within_groups 2M: p50 196 ms 8M: p50 761 ms reads all rows uncertain_page 2M: p50 254 ms 8M: p50 784 ms reads the band active_page 2M: p50 245 ms 8M: p50 780 ms reads the keyset half Restricting scored through members gains nothing: a page's members are scattered across the key space, so neither zone maps nor the join filter prune. Sort-on-write by rec_a_key helps active_page only (20-23 ms flat), and it needs a table-level sort, since upsert_from_scored is a MERGE. Live p3live (780k records) serves /duplicates at p50 1227 / p95 1330 ms per page end to end, and /merge-plans at p50 1761 ms. The verdict is recorded in each statement's description. The bounded fix for 10^7 (an entity-keyed edge projection, plus the two layouts) is #1440. Co-Authored-By: Claude Opus 5.5 <[email protected]>
athvin
temporarily deployed
to
marketing-preview
November 29, 2026 12:49 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #833
What
Measures the three per-page reads over
match_scoresand records each verdict in its statement's yaml description. The bounded fix for 10⁷ active scores is filed as #1440.Why
#833's done-when: rows read and latency at a stated corpus size, a measurement for each candidate fix, and the verdict in the yaml. Verdict: linear in active scores, about 100 ms per million. Accepted at current tenant scale.
Proof
Harness: an uncommitted er-cli example on the engine's DuckDB 2.0.1 / DuckLake, with rows in write order (the table declares no
order_by), 50-row pages, and p50/p95 over 20 runs after 3 warm-ups.within_groupswithin_groups,scoredbounded throughmembersuncertain_pageactive_pageactive_pageon a copy sorted byrec_a_keyLive p3live (780k records):
/duplicatesp50 1227 / p95 1330 ms,/merge-plansp50 1761 ms per 50-entity page.make checkexit 0.Risk & rollback
Descriptions only. The generated doc comments move and no SQL changes. Rollback:
git revert <merge-sha>.Post-merge ledger
Closed by: agent · session
Claude Code:24d16c2e-fec6-49d8-9797-060338df4848onbrians-MacBook-Pro· 2026-11-29T13:57:30Zmainis green with this change on it — the merge SHA, and the runthat proves it. A later head SHA with this commit as an ancestor counts;
a cancelled run with zero jobs does not: — 5c0bcdd, rust 46264283992 + frontend 46264283966 success
imagesbuilt, or correctly never ran because nothing that goes intoan image changed: — success, run 46264284012
deployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion: — its own deploy 46264663476 FAILED at er-schema-migrate from fix(boot): an org with two datasets each at config v1 fails every boot — ensure_default_dataset_for's config read returns two rows #1445 (not this diff: yaml descriptions only). It reached er-dev in deploy 46268589537 (6110fdb, contains 5c0bcdd), green
deploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change: — infra, devcontainer success on 5c0bcdd
Donethrough the automation rather than byhand, and the issue closed: — perf(read): within_groups scans the full active match_scores per request — measure before it matters #833 CLOSED by perf(read): measure the match_scores page reads — linear in active scores, accepted at current scale (#833) #1441 via automation
(a skill, a reference, memory) — or nothing new was learned: — match_scores declares no order_by, so a sorted synthetic table flatters keyset reads; measure in write order
Specific to this change
Context — plan, discoveries, measurements, files
Plan
Discoveries
Measurements
Files
🤖 Generated with Claude Code