Optimization Phases and Missed Opportunities
SQL Server query optimizer search phases and aggregate transformations using TOP
.
SQL Server query optimizer search phases and aggregate transformations using TOP
.
Improving the performance of SQL Server partitioned table joins using a manual query rewrite to implement a collocated (per-partition) join.
The SQL Server "Switch" execution plan operator, cardinality estimates on filtered indexes, and invisible operators.
SQL Server filtered unique indexes do not provide uniqueness information to the query optimizer. Redundant predicates may be needed to match filtered indexes.
The SQL Server query optimizer can fail to push a filter past a windowing function. This article shows how to improve the performance of queries that filter on views with window functions like ROW_NUMBER
and RANK
.
Internal details about execution plans and work tables. Nested loops prefetching and manufactured LOBs causing poor performance, and how to fix it.
Halloween Protection in SQL Server and how it affects INSERT
, UPDATE
, DELETE
, and MERGE
statements. Details of internal optimizations.
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.
IGNORE_DUP_KEY
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.
MERGE
Bug with Filtered IndexesA 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.