Here’s the execution plan … now what?
summary
Examines real plans to find the exact culprit: a dashboard paginated_sales_report uses a temp table and a full Sort that requests ~47 MB per execution, multiplying into RESOURCE_SEMAPHORE waits when ~999 of 1000 calls request page 1; rewriting page 1 to use TOP 20 (no temp table) forces a top-end sort and drops the grant to ~14 MB (fixing the semaphore problem). Uses execution plans, Query Store and plan properties (memory grant, estimated rows, hash vs sort) and shows optional-parameter fixes: split procedures, safe Dynamic SQL or OPTION(RECOMPILE).
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:34Theory versus execution plans
- 4:47Resource semaphor waits in SQL Server
- 8:47Paginated sales report analysis
- 12:20Memory-heavy operators in plans
- 16:21Optimizing memory grants for dashboards
- 27:29Bug in optimized query
- 29:15Erratic query performance patterns
- 32:06Query Store for performance issues
- 38:29Bad parameter sniffing causes
- 43:06Fixing bad parameter sniffing
- 47:42Dynamic SQL to avoid sniffing
- 50:13Balancing optimization and business
related talks
51mHere’s the execution plan … now what?
51mHere’s the execution plan … now what?
44mImproving Performance with Intelligent Query Processing
19mStabilizing Performance with Query Store
53mBanishing Slow Queries with Intelligent Query Processing
58m"Run Query Run" - A Fresh Look at SQL Wait Stats
53mWhen to stop tuning a query
51mAdvanced Plan Explorer Usage for Tuning Execution Plans
