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

Reduce transactions for writes #5919

Closed
pimeys opened this issue Mar 1, 2021 · 0 comments · Fixed by prisma/prisma-engines#4084
Closed

Reduce transactions for writes #5919

pimeys opened this issue Mar 1, 2021 · 0 comments · Fixed by prisma/prisma-engines#4084
Assignees
Labels
kind/improvement An improvement to existing feature and code. team/client Issue for team Client. topic: performance/queries topic: performance
Milestone

Comments

@pimeys
Copy link
Contributor

pimeys commented Mar 1, 2021

If we only trigger one query for a write operation, we do not need to run it in a transaction, therefore saving two roundtrips from the query. In certain databases, an insert, update or delete query can return the data in the same query. This would cut an insert/update/delete and select combination into a single query. And now when we run only one query, we don't need to run that inside a transaction, saving more roundtrip time.

This would help with pool timeouts, described in #4280

We might need to implement the RETURNING ticket first to reduce the number of queries per write: #5043

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement An improvement to existing feature and code. team/client Issue for team Client. topic: performance/queries topic: performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants