Topic
Databases & EF Core
EF Core and database engineering from query shape and indexes to concurrency, pagination, and connection management.
Transaction isolation levels: the anomalies each level allows
Database transaction isolation levels are a menu of anomalies you tolerate, not a safety dial. Watch write skew commit, then add the retry Serializable needs.
Read article →EF Core bulk updates with ExecuteUpdate and ExecuteDelete
An EF Core bulk update that loads 50,000 entities to change one column pays per byte and per statement. ExecuteUpdate sends one statement and skips the tracker.
Read article →Optimistic concurrency in EF Core: stop silent overwrites
Two users edit the same row and the last save silently wins. Use EF Core concurrency tokens, handle DbUpdateConcurrencyException, and test the race properly.
Read article →Connection pooling: why your app ran out of connections
Connection pooling explained from the failure end: what a connection costs, the three ways pools drain, and why the timeout blames the wrong request.
Read article →How do database indexes work? B-trees, page by page
How do database indexes work? A B-tree is a small sorted structure with huge fanout, so a lookup reads a handful of pages instead of the whole table.
Read article →Skip and Take will betray you: offset vs keyset pagination
OFFSET pagination reads every row it skips, so page 2,000 costs 2,000 pages of work. Keyset pagination seeks straight to the next page. SQL and EF Core shown.
Read article →EF Core habits that quietly wreck performance
Nine EF Core habits that pass every test and quietly tank production performance: missing AsNoTracking, whole-entity fetches, N+1, cartesian explosion, more.
Read article →Your LINQ is fast; your query plan isn't
A well-written EF Core query can still do a sequential scan: no index, or a function on a column makes it non-sargable. How to read a query plan and fix it.
Read article →IQueryable vs IEnumerable: the one return type that decides where your query runs
Returning IEnumerable, or calling ToList too early, moves filtering and paging into memory. One type change turns an indexed WHERE into loading a million rows.
Read article →The N+1 query problem in EF Core: the most expensive habit in .NET
An EF Core loop that looks innocent fires one query per row. It passes every unit test and dies in production. How N+1 happens, the SQL it generates, the fix.
Read article →