Skip to content

Conversation

@vividsnow
Copy link
Contributor

Perl Feersum native interface benchmark

@github-actions
Copy link
Contributor

The following frameworks were updated, pinging maintainers:
feersum: @vividsnow

@vividsnow vividsnow force-pushed the master branch 2 times, most recently from 9a4f810 to 76151cc Compare September 27, 2024 22:47
@vividsnow
Copy link
Contributor Author

Hi

I'm confused regarding the rule for updating multiple rows in one query. According to the wiki:

Using bulk updates—batches of update statements or individual update statements that affect multiple rows—is acceptable but not required. To be clear: bulk reads are not permissible for selecting/reading the rows, but bulk updates are acceptable for writing the updates.

At the same time, if I understand correctly, there is a test on the number of executed update queries, which checks for ~ 1 update per statement: https://github.com/TechEmpower/FrameworkBenchmarks/actions/runs/11078743989/job/30786616269?pr=9297#step:9:1149.

So, is it ok to update multiple rows in one statement?

@msmith-techempower
Copy link
Member

Correct, but only for the Updates test specifically.

Is this ready to merge or does this answer change your understanding to the point where you want to update?

@vividsnow
Copy link
Contributor Author

Hi, @msmith-techempower

Does this form of prepared statement count as a bulk update?

with t(v,i) as (values (?,?), (?,?), ...)
update World w
set randomNumber = t.v
from t
where t.i = w.id

@msmith-techempower
Copy link
Member

Yes, that query does write multiple updates in a single statement (a "bulk update"), and it does not do a single "bulk read" that returns rows; therefore, I believe it should be allowed.

@vividsnow
Copy link
Contributor Author

vividsnow commented Jan 8, 2025

As far as I understand the verification process steps: 1 and 2, it will not tolerate executed queries which are significantly less than the expected value:

Checks that the number of executed queries, at the given concurrency level,
corresponds to: the total number of http requests made * the number of queries per request.

Therefore, until the verification process is changed, I consider this pull request ready to merge.

@msmith-techempower msmith-techempower merged commit b7bf1e9 into TechEmpower:master Jan 9, 2025
3 checks passed
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.

2 participants