Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace one update call per row with one update call for multiple rows #1518

Conversation

tristanvuong2021
Copy link
Contributor

The addBinding method executes one update per row. When the number of rows is large, the performance suffers. For 800 measurements, update takes 1.4 seconds locally. With the change in this PR, update takes 0.8 seconds.

The refactoring is done this way because R2DBC doesn't automically transform the update into a single batch update. See pgjdbc/r2dbc-postgresql#527.

@wfa-reviewable
Copy link

This change is Reviewable

@tristanvuong2021 tristanvuong2021 marked this pull request as ready for review March 11, 2024 18:10
Copy link
Member

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 4 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @tristanvuong2021)

Copy link
Collaborator

@stevenwarejones stevenwarejones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 4 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @tristanvuong2021)

@tristanvuong2021 tristanvuong2021 merged commit 6dbb326 into main Mar 13, 2024
4 checks passed
@tristanvuong2021 tristanvuong2021 deleted the tristanvuong-replace-separate-updates-with-1-large-update-per-table branch March 13, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants