Cardinality estimation (CE) is how the optimizer predicts the number of rows that will flow through each operator in a plan. Those estimates drive cost, join choices, memory grants, and ultimately latency and resource usage. SQL Server has shipped multiple CE models over time. The pre-2014 model—commonly called the legacy CE—dates back to SQL Server 7.0. Starting in SQL Server 2014, Microsoft introduced a new CE and has continued refining it in later releases, including SQL Server 2022. Keeping the legacy CE turned on in SQL Server 2022 is usually the wrong long-term choice.
Category: Performance
Controlling TempDB Resources with Resource Governor in SQL Server 2025
Every SQL Server instance relies on tempdb as its universal scratch pad. When one poorly-written report or maintenance job floods that database with temporary objects, the entire server can stall or even go offline. SQL Server 2025 finally gives database administrators a precise brake pedal: TempDB Space Resource Governance, an extension to Resource Governor that lets you cap how much tempdb space each workload can consume.
Avoiding the Halloween Problem in SQL Server with Safer UPDATE Patterns
The Halloween Problem can silently degrade SQL Server performance by causing rows to be updated multiple times in a single statement. This post explains how SQL Server’s internal table spool (eager spool) protects against it—and why that can hurt your workload under heavy load. You’ll learn two simple patterns—using CTEs or temp tables—to materialize target rows before the update, eliminating the need for spooky spools. Finally, we cover how batch updates help control locking, reduce escalation risk, and improve concurrency.
Index Maintenance on Your SQL Server VLDBs
Most database administrators are comfortable with the daily tasks of backup, CHECKDB, index maintenance, and statistics updates. The available guidance for those topics is extensive. Much less has been written about caring for estates that contain hundreds of databases—or a single database large enough to strain conventional maintenance windows. This post will focus on options that help when individual tables or complete databases grow beyond the point where “standard” maintenance jobs finish in a reasonable time.
Optimizing SQL Server with Indirect Checkpoints and Target Recovery Time
A checkpoint is a background process that writes dirty pages to disk. A checkpoint performs a full scan of the pages in the buffer pool, lists all the dirty pages that are yet to be written to disk, and finally writes those pages to disk. In SQL instances that do not have many dirty pages in the buffer pool, this is a trivial operation. However, with SQL instances that have OLTP databases, use more memory and/or involve sequential scanning of all pages, the performance of the system could be impacted.
Five SQL Server 2025 Enhancements DBAs Will Notice
There is a lot to be excited about in SQL Server 2025! When thinking about features that may not get as much attention as others, yet will make a real difference in the lives of DBAs, I have selected my top 5 enhancements for SQL Server 2025. These improvements may not make the headlines, but they address pain points we’ve all experienced as DBAs. Please let me know if I’ve left any of your favorites off the list.
Filtered Indexes in SQL Server: Targeted Performance in High-Volume Tables
When a table holds millions of rows yet most queries touch only a small, well-defined subset, a traditional non-clustered index feels like using a searchlight to find something sitting under a desk lamp: the index still stores an entry for every row even though the workload rarely needs most of them. SQL Server’s answer is the filtered index—introduced in SQL Server 2008 and still under-used today—allowing you to index just the rows that match a predicate you supply in a WHERE clause.
Lock Escalation in SQL Server: Understanding and Troubleshooting for Performance
Lock escalation is a built-in mechanism in SQL Server designed to optimize how the database engine manages locks. By reducing thousands of fine-grained locks (such as row or page locks) to a single table-level lock, SQL Server aims to lower overhead in the lock manager. In practice, lock escalation saves system resources but can also introduce challenges in high-concurrency environments. This post explores why lock escalation happens, how it works under the hood, the problems it can cause, and strategies to prevent or mitigate unwanted escalations.
Natively Compiled Stored Procedures with in-memory OLTP in SQL Server
Modern applications often demand lightning-fast performance from their databases, whether they’re handling large transactional workloads or complex analytical queries. SQL Server’s in-memory OLTP feature addresses these needs by using memory-optimized tables and natively compiled stored procedures to boost throughput and reduce latency. This post provides an overview of natively compiled stored procedures, how to create them, and best practices for performance monitoring and maintenance.
Comparative Analysis: SQL Server on Linux vs. Windows for Production
For years, SQL Server was synonymous with the Windows operating system, a pairing that brought deep integration and mature ecosystem support. The arrival of SQL Server on Linux introduced a broader choice, allowing organizations to deploy Microsoft’s flagship relational database on an entirely different platform. Although both versions share the same core engine, technical differences persist in the way each handles process scheduling, I/O, security, and administration.