Understanding AsTracking vs AsNoTracking in EF Core
Every time Entity Framework Core materializes entities from a query, it decides whether to track those entities in the DbContext's change tracker. Tracking is what lets EF Core detect changes and generate UPDATE/DELETE statements when you call SaveChangesAsync(). That capability isn't free — it costs memory (snapshotting original values, maintaining an identity map) and CPU cycles. In many read-only code paths, that cost buys you nothing.