dotnet / dotnet/efcore

Promote SQL Server bulk insert logic to relational ReaderModificationCommandBatch

Open
#29,668 0 comments 1 reaction 0 assignees View on GitHub
area-save-changes
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

SqlServerModificationCommandBatch has a bulk insert logic, where multiple insertions are coalesced into a single, efficient MERGE statement. We should promote the infrastructure for coalescing multiple modification commands into a single SQL statement to relational:

* It would allow other providers to more easily implement bulk insert etc.
* It's currently a bit tricky to implement the logic only in SqlServerModificationCommandBatch, without ReaderModificationCommandBatch knowing anything about it (e.g. [this](https://github.com/dotnet/efcore/issues/29539#issuecomment-1325572271)). Adding the proper hooks in ReaderModificationCommandBatch would simplify this.
* We should make this support non-insertion as well (e.g. #27550).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.