perf(delete): drop per-key B-tree probe & bulk-delete PK on the FW contiguous path (M3) - #382
Merged
Merged
Conversation
…ntiguous path The shared B8/B9 contiguous probe resolved every key with one Index.Search and then TryBulkDeleteContiguousFixedWidth removed the PK entries one Delete at a time — ~20K B-tree operations per 10K-row fixed-width batch. The probe now locates only the FIRST key through the tree, computes the remaining positions by the fixed-width stride, reads the contiguous span once and verifies every record by its length prefix AND its decoded fixed-width PK slot (equal to the batch key); the delete removes the PK entries with one DeleteBulk pass. The verification rejects exactly the batches the old per-key search rejected gaps/tombstones surface as prefix mismatches, a differing PK falls back like a tree miss), so nothing is modified before the whole span is proven valid. Fair-PK median-of-3 (sequential, uncontended): fixed-width UPDATE ~245K, DELETE ~172K ops/s vs ~138-164K/~120-156K in the earlier single-shot runs.
|
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.



Samenvatting
FW contigu pad (B8/B9): per-key B-tree probe vervangen door decode-verificatie +
DeleteBulk.De gedeelde contiguous-probe resolved elke key met één
Index.Search(~10K searches per10K-row batch) en de FW-DELETE verwijderde de PK-entry's daarna één
Deleteper key — samen~20K boomoperaties per batch. Nu:
PK-slot (gelijk aan de batch-key) — dezelfde batches vallen terug als voorheen (gaps/tombstones
→ prefix-mismatch; afwijkende PK → fallback), en er wordt niets gemuteerd vóór de hele span
bewezen geldig is;
DeleteBulk.Metingen (fair-PK median-of-3, sequenced, zelfde machine)
Let op: INSERT/READ (onveranderde paden) varieerden tussen de twee median-runs met ±10-20% —
er blijft omgevingsruis op deze machine; de SQLite-ratio binnen elke run is daardoor de meest
betrouwbare maat. Richting is consistent positief op alle DELETE/UPDATE-ratio's.
Validatie
probe-verificatie af.