Skip to main content
InterviewHubPRO
Section Overview
Q43

Question 43 of 50

Part 3: Distributed Systems, Kestrel Internals & Scalability (25 - 35)

86%
ASP.NET Core & Web API (50 Qs)•Part 3: Distributed Systems, Kestrel Internals & Scalability (25 - 35)

Entity Framework Core Performance: `AsNoTracking` and Split Queries.

senior LevelFormsPerformanceSystem Design

In Simple Words:

  1. AsNoTracking(): Tells EF Core not to cache entities in the ChangeTracker. Reduces memory consumption by 50% and speeds up read queries by 2-3x!
  2. Split Queries (AsSplitQuery()): When loading multiple child collections (.Include(o => o.Items).Include(o => o.Notes)), relational databases produce Cartesian product duplication. .AsSplitQuery() generates separate SQL queries per collection, eliminating explosive row duplication.