ROX-32721: Add RunSelectDirectFn for direct pgx row scanning#20028
Draft
dashrews78 wants to merge 1 commit intomasterfrom
Draft
ROX-32721: Add RunSelectDirectFn for direct pgx row scanning#20028dashrews78 wants to merge 1 commit intomasterfrom
dashrews78 wants to merge 1 commit intomasterfrom
Conversation
|
Skipping CI for Draft Pull Request. |
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
This was referenced Apr 15, 2026
Contributor
🚀 Build Images ReadyImages are ready for commit bc1d736. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-674-gbc1d73669a |
Contributor
🚀 Build Images ReadyImages are ready for commit acc538d. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-659-gacc538da5e |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20028 +/- ##
=======================================
Coverage 49.67% 49.67%
=======================================
Files 2765 2765
Lines 209039 209082 +43
=======================================
+ Hits 103834 103860 +26
- Misses 97527 97538 +11
- Partials 7678 7684 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add a companion to RunSelectRequestForSchemaFn that reuses the full query builder pipeline (SAC, WHERE, ORDER BY, LIMIT, pagination) but scans rows with pgx rows.Scan instead of scany reflection. This eliminates per-field heap allocations on hot paths where the column layout is known at compile time. Benchmarking against the alert ListAlert query showed scany reflection was the primary bottleneck -- switching to direct scanning yielded 2-3x latency improvement and ~8x memory reduction. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
acc538d to
bc1d736
Compare
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.
Add a companion to RunSelectRequestForSchemaFn that reuses the full
query builder pipeline (SAC, WHERE, ORDER BY, LIMIT, pagination) but
scans rows with pgx rows.Scan instead of scany reflection. This
eliminates per-field heap allocations on hot paths where the column
layout is known at compile time.
Benchmarking against the alert ListAlert query showed scany reflection
was the primary bottleneck -- switching to direct scanning yielded
2-3x latency improvement and ~8x memory reduction.
Partially generated by AI.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Description
change me!
User-facing documentation
Testing and quality
Automated testing
How I validated my change
change me!