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

[Feature Request] Support batching upsert in SQL Server Memory DB #485

Closed
marcominerva opened this issue May 14, 2024 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@marcominerva
Copy link
Contributor

Context / Scenario

Kernel Memory now supports batching upsert in Memory DBs (see #441).

The problem

Batching upsert can greatly improve the overall performance.

Proposed solution

It would be great to have batching upsert support also in SQL Server Memory DB.

/cc @kbeaugrand

Importance

would be great to have

@marcominerva marcominerva added the enhancement New feature or request label May 14, 2024
dluc added a commit that referenced this issue May 18, 2024
Related to #485

Implements batching upsert functionality in SQL Server Memory DB and
updates documentation to reflect the new feature.

- **Code Enhancements:**
- Introduces the `IMemoryDbBatchUpsert` interface in
`SqlServerMemory.cs` to support batch upsert operations.
- Adds a new method `BatchUpsertAsync` for handling multiple record
upserts in a batch, improving performance for bulk operations.
- Modifies the `UpsertAsync` method to internally call
`BatchUpsertAsync`, ensuring consistency in handling single and multiple
record upserts.
- Implements exception handling for batch upsert scenarios, including
throwing an `IndexNotFoundException` when attempting to upsert to a
non-existent index.

- **Documentation Updates:**
- Updates `README.md` in the SQL Server extension directory to include
information about the new batch upsert feature.
- Provides examples on how to use the `BatchUpsertAsync` method for
efficient data insertion or updating.


---

For more details, open the [Copilot Workspace
session](https://copilot-workspace.githubnext.com/microsoft/kernel-memory/issues/485?shareId=52eb982e-57e2-421a-adb5-fab759ce9b5c).

---------

Co-authored-by: Devis Lucato <dluc@users.noreply.github.com>
@dluc
Copy link
Collaborator

dluc commented May 19, 2024

completed

@dluc dluc closed this as completed May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants