Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Reading Execution Plans 2: Memory Grants, Spills, Parallelism and Implicit Conversion Warnings
Plan warnings show the price of an estimate: a small estimate leaves the memory grant short and spills to tempdb, a low cost threshold spreads small queries over 10 threads, and an nvarchar parameter on a varchar column turns a 3-page lookup into 3,117 pages. Memory grant feedback, exchange operators, CX waits, DOP feedback on by default in 2025, implicit conversion with EF Core and Dapper, batch mode and adaptive joins.
Reading Execution Plans 1: Estimated vs Actual Plans, Operators and Join Algorithms
An execution plan is read right to left, inside out; the first thing to check is not cost percentage but estimated versus actual rows and how many times each operator ran. Where cost percentage misleads in the actual plan of an EF Core Include query, seek/scan/lookup, the measured cost of nested loops, merge and hash joins on the same query, stream and hash aggregates, and going from 2,549 to 689 logical reads with two indexes.