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

upsert instead of select and then update or insert #646

Open
arner opened this issue Aug 6, 2024 · 0 comments
Open

upsert instead of select and then update or insert #646

arner opened this issue Aug 6, 2024 · 0 comments

Comments

@arner
Copy link
Contributor

arner commented Aug 6, 2024

The SetState function of the sql version of KVS and Vault uses an ANSI compliant but not the most performant way to do an upsert; it tries a SELECT and based on the result, chooses to do an INSERT or an UPDATE.

Now that we have two distinct database drivers for postgres and sqlite, we should also use their respective ways to do an upsert in a single call.

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

No branches or pull requests

1 participant