A window function leaves Segment and Sequence Project operators in a query plan, and a Sort in front of them. This post tests ROW_NUMBER and a running total on SQL Server 2025, shows the batch mode Window Aggregate that replaces them, and removes the Sort with an index.
The Filter Operator: When SQL Server Reads Everything and Keeps a Few Rows
The Filter operator keeps a few rows after the plan has read and sorted many more. This post shows one on SQL Server 2025 with the actual plan and the logical reads, then rewrites the query so it seeks instead and reads about a fifth as many pages.
Capture Query Plans With Extended Events: A Safe, Scoped Session
To capture query plans without guessing, use an Extended Events session scoped to one database and a duration threshold. This post builds one on SQL Server 2025, reads the captured actual plan, and measures why plan capture must be switched on briefly and then off.
How to Use GOTO command in SQL Server? – Interview Question of the Week #249
Question: How to Use GOTO command in SQL Server?
Answer: Let us see a simple example of how GOTO works in SQL Server in this blog post.
RETURN Statement in a Stored Procedure: Exit Early
The RETURN statement ends a stored procedure at once and hands back one integer status code. This post builds a small demo, shows how to read the code, stops a procedure after a chosen step, and tests what RETURN does with NULL, text, open transactions and errors.
Nonclustered Columnstore Index on a Temp Table in SQL Server
A nonclustered columnstore index works on a temp table but not on a table variable. This post loads a temp table, builds the index, and measures the same aggregate query before and after. It also shows the error a table variable raises and when the build cost pays off.
NEWID vs NEWSEQUENTIALID: What Each Does to Your Index
NEWID vs NEWSEQUENTIALID decides whether new uniqueidentifier keys land at random in your clustered index or in order at the end. This post loads 20,000 rows with each default, measures pages, fullness and fragmentation, and shows the limits of NEWSEQUENTIALID. It also answers what happens when you switch the default on a table that already has rows.







