EF Core's naive load-modify-save pattern causes severe performance issues at scale, allocating gigabytes of RAM and issuing one SQL statement per entity. EF Core 7+ introduced ExecuteUpdate and ExecuteDelete, which bypass the change tracker and execute a single server-side SQL statement regardless of row count. Benchmarks
Table of contents
The Code Every Developer Has Written and RegrettedThe Built-In Answer: ExecuteUpdate and ExecuteDeleteThe Missing Piece: There Is No ExecuteInsertEFE’s Batch Operations: UpdateFromQuery, DeleteFromQuery, InsertFromQueryBenchmarks: The Honest NumbersChoosing the Right ToolCaveats That Will Catch You Off-GuardConclusionSort: