The READPAST query hint makes a read skip rows that another transaction has locked, instead of waiting for them. This post builds a five-seat demo, runs it in two windows and lists the cases where the hint does nothing. It also shows the work queue pattern that pairs READPAST with UPDLOCK.
SQL SERVER – Is Stream Aggregate is Same as Gather Streams of Parallelism?
Is Stream Aggregate is Same as Gather Streams of Parallelism? – This was one of the brilliant questions I had received during my recent engagement.
ENABLE_PARALLEL_PLAN_PREFERENCE Limits: Rows Per Thread
The ENABLE_PARALLEL_PLAN_PREFERENCE limits are easy to miss: the hint can’t make every query parallel, and it can’t spread rows evenly over the threads. This post proves three limits from the last actual plan of demo queries, with the rows each thread processed and the reason a plan stays serial.
SQL SERVER – Public Role Permissions and Effective Security Risk
Every database user belongs to Public and cannot be removed from that role. A reader asked whether the role should be eliminated.
Force a Parallel Plan: ENABLE_PARALLEL_PLAN_PREFERENCE Hint
To force a parallel plan for one query, add the ENABLE_PARALLEL_PLAN_PREFERENCE hint to its OPTION clause. This post shows why a cheap query stays serial, runs a demo query with and without the hint, proves the difference from the last actual plan, and explains why the hint belongs in a test and not in every query.
DBCC DBREINDEX: Replace It With ALTER INDEX in SQL Server
DBCC DBREINDEX still runs on SQL Server 2025, but it is deprecated, and ALTER INDEX does everything it did and more. This post rebuilds a fragmented demo table both ways, shows the options only ALTER INDEX has, and finds old uses of DBCC DBREINDEX in your own modules, Agent jobs and the deprecation counter.
How to Use a CASE Statement in the WHERE Clause? – Interview Question of the Week #239
Question: How to Use a CASE statement in the WHERE Clause? Answer: First of all – CASE is not a statement but rather an expression.
Read Heavy Workload or Write Heavy: Measure It in SQL Server
To tell a read heavy workload from a write heavy one, compare what the server reads with what it changes, and measure it over a window. This post counts reads and writes per table, reads the buffer and log counters with two snapshots, and explains what each lens misses.
PRINT Date Format in SQL Server: PRINT Versus SELECT
The PRINT date format differs from the SELECT format, because PRINT converts the value to text first. This post tests PRINT with six date and time types, shows why joining text and a datetime fails with Msg 241, shows how the session language changes the month name, and gives the formats that stay the same everywhere.
Actual Execution Plan in SQL Server: Graphical, Text and XML
An actual execution plan shows how SQL Server really ran a query, with the true row counts beside the estimates. This post gets the plan three ways, as a graphical plan, as text with SET STATISTICS PROFILE and as XML, and uses a demo table to show how the estimate and the actual number can disagree.










