The Halloween Problem—Part 4

SQL Server Halloween Protection and the query optimizer. Redundant sorts and other non-eager table spool options.
SQL Server Halloween Protection and the query optimizer. Redundant sorts and other non-eager table spool options.
SQL Server Halloween Protection special optimizations for the MERGE
statement. Hole-filling and rowset sharing.
When SQL Server Halloween Protection is needed for INSERT
and DELETE
statements. Constraint checking and phase separation.
Halloween Protection for SQL Server UPDATE
queries. Why protection is needed and how it is implemented.
Incorrect results from a SQL Server query using MERGE
, indexed views and foreign keys.
Adding the IGNORE_DUP_KEY
option to an existing primary key without downtime. How the execution plans generated for IGNORE_DUP_KEY
work.
Optimizing the performance of SQL Server INSERT
, UPDATE
, DELETE
, and MERGE
statements. Execution plan analysis and undocumented trace flags. Narrow (per-row) and wide (per-index) plans.
A SQL Server bug with unique filtered indexes. Covers narrow update plans and the Split, Sort, Collapse operator combination.
Incorrect SQL Server estimated row counts on Key and RID Lookup operators where a Filter is applied.
SQL Server can fail to eliminate partitions from a query due to implicit type conversion.
How the SQL Server Compute Scalar operator works internally.
Slow SQL Server DELETE
peformance caused by unexpected page splitting or forwarded ghost records.
Internal details of SQL Server temporary table and table variable caching.
How SQL Server temporary table caching can affect statistics, execution plans, and recompilations in unexpected ways.
Why TOP
may not work well with SQL Server parallel queries.
Internal operation of the SQL Server query optimizer. Writing queries that will take advantage of the optimizer's relational reasoning.
SQL Server query optimizer memo structure, search stages, and final plan selection.
Cost-based optimization in the SQL Server query optimizer, the input tree, properties, and rules.