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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: instead running two queries now a single query can do the same thing #6705

Merged

Conversation

atiq-bs23
Copy link
Contributor

Motivation and Context

  1. Instead of executing two SQL queries, a single query can do the same thing.
  2. Performance improvement

Description

Previously the InternalUpsertAsync method was executing two sql query by calling two individual methods - First UpdateAsync and then second InsertOrIgnoreAsync.

The new method uses the INSERT OR REPLACE statement to either update an existing row or insert a new one based on the unique collection and key combination

Contribution Checklist

@atiq-bs23 atiq-bs23 requested a review from a team as a code owner June 14, 2024 08:13
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel memory labels Jun 14, 2024
@github-actions github-actions bot changed the title instead running two query now a single query can do the same thing .Net: instead running two query now a single query can do the same thing Jun 14, 2024
@atiq-bs23 atiq-bs23 changed the title .Net: instead running two query now a single query can do the same thing .Net: instead running two queries now a single query can do the same thing Jun 14, 2024
@atiq-bs23
Copy link
Contributor Author

@microsoft-github-policy-service agree

@atiq-bs23
Copy link
Contributor Author

@RogerBarreto should I remove the InsertOrIgnoreAsync method as there are no other reference where this method used.
I didn't remove this method in the current commit.

@westey-m westey-m added this pull request to the merge queue Jun 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 14, 2024
@westey-m westey-m added this pull request to the merge queue Jun 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 14, 2024
@westey-m westey-m added this pull request to the merge queue Jun 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 14, 2024
@westey-m westey-m added this pull request to the merge queue Jun 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 14, 2024
@westey-m westey-m added this pull request to the merge queue Jun 14, 2024
@dmytrostruk dmytrostruk removed this pull request from the merge queue due to a manual request Jun 14, 2024
@dmytrostruk dmytrostruk added this pull request to the merge queue Jun 14, 2024
Merged via the queue into microsoft:main with commit bb1eb3a Jun 14, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel memory .NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants