Changes to a Writable Partition May Fail Unexpectedly
Why an update may fail when a partition has some data on a read-only filegroup due to "rowset sharing". Includes several workarounds for the issue.
Why an update may fail when a partition has some data on a read-only filegroup due to "rowset sharing". Includes several workarounds for the issue.
The SQL Server query optimizer does not use uniqueness information obtained through automatic indexed view matching.
Follows the process of optimizing a simple update query and explores some deep internals including "lazy latches" along the way.
Optimized and static bitmap filters, null rejection, and worst-case hash join performance.
Surprising implementation details for INSTEAD OF triggers and a cardinality estimation bug in SQL Server 2014 onwards.
Avoiding large memory grants and excessive scalar computations.
Analyzing the cause of lower than expected performance and applying a correction.
The type and number of locks acquired and released during query execution can have a surprisingly large impact on performance, even if no waiting or blocking occurs.
A fast way to compute single and grouped medians using a dynamic T-SQL cursor.
SQL Server sort internals, including in-memory sorts and two new classes specific to In-Memory OLTP.
The first four of the seven SQL Server sorts described in detail.
The guarantees provided by the weakest of the standard transaction isolation levels. Includes examples of less well-known concurrency effects.
Details of a SQL Server bug that can render an indexed view incorrect.
How SQL Server maintains indexed views as the underlying data changes.
How SQL Server allocation ordered scans work in detail, when they can and can't be used, and how to disable them (almost) completely.
Thinking laterally to find a better algorithm rather than tuning individual SQL Server execution plan operators.
How merge concatenation can be used to avoid sorting, if you know enough about the SQL Server execution engine.
Though SQL is a declarative language, expressing queries differently can dramatically change execution plans.