#DatabaseDevelopment Posts
Tracking vs No-Tracking Queries Explained
When working with Entity Framework, one of the most overlooked performance considerations is whether queries should be tracked or not. By default, Entity Framework tracks entities returned from queries, allowing changes to be detected and saved automatically. However, tracking comes with overhead and is not always necessary. Understanding when to use tracking and no-tracking queries can improve application performance and reduce memory usage.

Writing Raw SQL When Entity Framework Isn’t Enough
Entity Framework makes database access straightforward, handling most queries with minimal code. However, there are situations where LINQ queries become difficult to optimise, database-specific features are required, or performance is critical. In these cases, writing raw SQL can provide greater control, improved efficiency, and access to capabilities that Entity Framework does not directly support.

Popular in #DatabaseDevelopment
Become a member
Get the latest news right in your inbox. It's free and you can unsubscribe at any time. We hate spam as much as we do, so we never spam!
