Skip redundant checked update predicates #9

Open
ober wants to merge 1 commit from optimize-unchanged-index-update into optimize-prepared-hotpaths
Owner

Skip the second WHERE predicate evaluation in simple non-FROM UPDATE loops when dml-target-rows has already filtered targets and triggers/FKs/RETURNING are absent.\n\nVerification:\n- make build\n- GERBIL_LOADPATH="/Users/user/mine/gerbil-sqlite:/Users/user/mine/gerbil-sqlite/.gerbil/lib:/Users/user/mine/gerbil-sqlite/gerbil-compat:/Users/user/mine/gerbil-sqlite/gerbil-compat/.gerbil/lib" timeout 240 /opt/gerbil/bin/gerbil env gxi tests/unit/test-api.ss\n- GERBIL_LOADPATH="/Users/user/mine/gerbil-sqlite:/Users/user/mine/gerbil-sqlite/.gerbil/lib:/Users/user/mine/gerbil-sqlite/gerbil-compat:/Users/user/mine/gerbil-sqlite/gerbil-compat/.gerbil/lib" timeout 240 /opt/gerbil/bin/gerbil env gxi tests/unit/test-exec.ss\n- N=1000 make bench-compiled\n- N=1000 make bench-prepared-compiled\n- N=10000 make bench-prepared-compiled\n- make binary && make smoke\n\nMeasured same-N check at N=10000 against the immediate parent branch showed prepared indexed UPDATE 176.72 ms vs 181.90 ms baseline, about 3% faster; total prepared 600.13 ms vs 617.42 ms.

Skip the second WHERE predicate evaluation in simple non-FROM UPDATE loops when dml-target-rows has already filtered targets and triggers/FKs/RETURNING are absent.\n\nVerification:\n- make build\n- GERBIL_LOADPATH="/Users/user/mine/gerbil-sqlite:/Users/user/mine/gerbil-sqlite/.gerbil/lib:/Users/user/mine/gerbil-sqlite/gerbil-compat:/Users/user/mine/gerbil-sqlite/gerbil-compat/.gerbil/lib" timeout 240 /opt/gerbil/bin/gerbil env gxi tests/unit/test-api.ss\n- GERBIL_LOADPATH="/Users/user/mine/gerbil-sqlite:/Users/user/mine/gerbil-sqlite/.gerbil/lib:/Users/user/mine/gerbil-sqlite/gerbil-compat:/Users/user/mine/gerbil-sqlite/gerbil-compat/.gerbil/lib" timeout 240 /opt/gerbil/bin/gerbil env gxi tests/unit/test-exec.ss\n- N=1000 make bench-compiled\n- N=1000 make bench-prepared-compiled\n- N=10000 make bench-prepared-compiled\n- make binary && make smoke\n\nMeasured same-N check at N=10000 against the immediate parent branch showed prepared indexed UPDATE 176.72 ms vs 181.90 ms baseline, about 3% faster; total prepared 600.13 ms vs 617.42 ms.
Skip redundant checked update predicates
All checks were successful
ci / test (push) Successful in 3s
ci / test (pull_request) Successful in 3s
3e74c1324b
All checks were successful
ci / test (push) Successful in 3s
ci / test (pull_request) Successful in 3s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin optimize-unchanged-index-update:optimize-unchanged-index-update
git switch optimize-unchanged-index-update

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch optimize-prepared-hotpaths
git merge --no-ff optimize-unchanged-index-update
git switch optimize-unchanged-index-update
git rebase optimize-prepared-hotpaths
git switch optimize-prepared-hotpaths
git merge --ff-only optimize-unchanged-index-update
git switch optimize-unchanged-index-update
git rebase optimize-prepared-hotpaths
git switch optimize-prepared-hotpaths
git merge --no-ff optimize-unchanged-index-update
git switch optimize-prepared-hotpaths
git merge --squash optimize-unchanged-index-update
git switch optimize-prepared-hotpaths
git merge --ff-only optimize-unchanged-index-update
git switch optimize-prepared-hotpaths
git merge optimize-unchanged-index-update
git push origin optimize-prepared-hotpaths
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ober/gerbil-sqlite!9
No description provided.