EFCore.BulkExtensions icon indicating copy to clipboard operation
EFCore.BulkExtensions copied to clipboard

making everything less chatty

Open Spirch opened this issue 3 years ago • 1 comments

for every table there is seven EF queries sent, in a case of SetOutputIdentity = true which include IncludeGraph = true

  1. create table
  2. create output table
  3. alter columns
  4. merge to destination table
  5. select to retrieve the identity
  6. delete table
  7. delete output table

for a single table, this could be reduced, looking at the adapter code, it might be a matter of collecting the sql query and concatenating them together in a way that make sense to execute in batch

next issue about this is if there is a lot of tables, that series of query will be execute for each table, so if there is 100 tables, there will be 700 execute queries, if all the queries can be done in batch / grouped together it would reduce the chattyness of the bulk process

Spirch avatar Apr 17 '21 00:04 Spirch

Looking into this.

maitlandmarshall avatar Apr 17 '21 02:04 maitlandmarshall