-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Plan for Entity Framework Core 7.0 #3624
Conversation
|
||
[Change tracking](xref:core/change-tracking/index) followed by [SaveChanges](xref:core/saving/index) is the primary mechanism in EF Core for inserting, updating, and deleting entities. This mechanism ensures that database operations are ordered to satisfy constraints, and that tracked entities are kept in sync with the changes made to the database. However, it requires a database roundtrip to load entities into memory in order to create the appropriate database commands, followed by a database roundtrip to execute these commands. | ||
|
||
In contrast, bulk, or set-based, updates involve defining the changes that should be made to the database and then executing those changes without first loading entities into memory. This can be significantly faster than tracked updates, especially when the same modification must be applied to many different entities/rows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In contrast, bulk, or set-based, updates involve defining the changes that should be made to the database and then executing those changes without first loading entities into memory. This can be significantly faster than tracked updates, especially when the same modification must be applied to many different entities/rows. | |
In contrast, bulk, or set-based, updates involve defining the changes that should be made to the database and then executing those changes without first loading entities into memory. In SQL, bulk updates are applied by sending statements such as `UPDATE [Blogs] SET [Rating] = [Rating] + 1`. This can be significantly faster than tracked updates, especially when the same modification must be applied to many different entities/rows. |
|
||
This feature will introduce a common mechanism and patterns for JSON support that can be implemented by any database provider. We will work with the community to align existing implementations for [Npgsql](https://github.com/npgsql/efcore.pg) and [Pomelo MySQL](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql), and also add support for SQL Server and SQLite. | ||
|
||
### Bulk updates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to be very clear that we don't plan on doing bulk insert (also added sentence below)...
### Bulk updates | |
### Bulk updates and deletes |
|
||
New LINQ operators have recently been added to the BCL, and we expect more to be added going forward. Issue [#25570](https://github.com/dotnet/efcore/issues/25570) tracks adding support for these to the EF7 LINQ provider. This issue will be updated as new LINQ operators are added. As with all existing LINQ operators, we will only add support when the operator has a reasonable and useful translation to the database. | ||
|
||
### Open telemetry for ADO.NET providers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Open telemetry for ADO.NET providers | |
### OpenTelemetry for ADO.NET providers |
|
||
Tracked by [Issue #22336: Standardize on DiagnosticSource/OpenTelemetry for database tracing](https://github.com/dotnet/runtime/issues/22336) | ||
|
||
Value proposition: Cross-platform, industry-standard telemetry that can be monitored in your tool of choice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Value proposition: Cross-platform, industry-standard telemetry that can be monitored in your tool of choice. | |
Value proposition: Cross-platform, industry-standard telemetry of database traffic that can be monitored in your tool of choice. |
|
||
Great performance is a fundamental tenet of EF Core, lower-level data access, and indeed all of .NET. Every release includes significant work on improving performance. As always, this theme will involve a lot of iterative investigation, which will then inform where we focus resources. | ||
|
||
### Performance of database inserts and updates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deletions as well, right? The bulk-set work item is about updates and deletes only (no bulk insert), but the general optimization of the update pipeling + change tracking should help all three.
@roji How come you didn't make these suggestions while were doing the internal reviews? |
Going to merge as-is, since otherwise we will be inconsistent across other parts of the EF7 docs. For example, links to high-level items from the blog. |
Sorry about that - I did review internally but these didn't occur to me. Though they're mostly cosmetic/text tweaking, no? |
Co-authored-by: Shay Rojansky <roji@roji.org>
Co-authored-by: Shay Rojansky <roji@roji.org>
Co-authored-by: Shay Rojansky <roji@roji.org>
Co-authored-by: Shay Rojansky <roji@roji.org>
Merged the ones that don't impact titles or value props. |
@smitpatel Ready for you. |
No description provided.