Database Topic Archive

SQL Server Articles

Wait statistics, tempdb, Query Store, Always On availability groups, and SQL Server operations notes.

SQL Server Buffer Pool Pressure: Why Page Life Expectancy Lies
7 min read

Every morning at 8:15 the buffer cache hit ratio sagged, page life expectancy fell off a cliff, and someone asked if the server needed more RAM. The server needed an index. How to read buffer pool counters without the folklore,…

SQL Server Accelerated Database Recovery: Fast Rollback Has a Meter
8 min read

A killed six-hour batch job once rolled back for nearly five hours, holding its locks the whole time. With accelerated database recovery the same class of kill returns the database in seconds — but the persisted version store becomes a…

Last-Page Insert Contention: When an IDENTITY Key Becomes a Queue
8 min read

The events table stalled at 4,100 inserts per second on a 96-core box with idle disks, and every waiter was queued on PAGELATCH_EX for the same page. Why ever-increasing keys funnel inserts into one latch queue, and what actually breaks…

SQL Server Transaction Log VLF Management for Fast Recovery
7 min read

A failover that should have taken two minutes took forty-seven because the log had 30,000 virtual log files. How autogrowth wrote that layout, what log_reuse_wait_desc is telling you, and how to rebuild the layout exactly once.

SQL Server Sliding Window Partitioning: Lifecycle, Not Speed
7 min read

The nightly purge had been deleting for six hours and generating 400 GB of log when they called me; the sliding-window replacement runs in 200 milliseconds. Partition functions, aligned indexes, SWITCH mechanics, and when partitioning is the wrong tool.

SQL Server Statistics: The Fuel the Cardinality Estimator Runs On
9 min read

The index existed and the seek was in the plan, but the estimate said one row and the table said fourteen million. How auto-update thresholds, sampling, and the ascending-key trap produce bad estimates, and how to triage them with sys.dm_db_stats_properties.