Question: How to Write INNER JOIN Which is Actually CROSS JOIN?
Experienced this question another day while working with a client.
Question: How to Write INNER JOIN Which is Actually CROSS JOIN?
Experienced this question another day while working with a client.
Compare RID lookups on heaps with clustered key lookups, inspect forwarded records, and test covering indexes with actual plans and reads.
ABORT_QUERY_EXECUTION is a SQL Server 2025 Query Store hint that makes one known bad query fail before it uses any CPU. This post sets the hint, shows the exact error the caller gets, lists and clears the hint, and covers the traps: exact text, SET options and queries already running.
An estimated plan for code that fills a temp table guesses one row for every read of that table. This post compares the estimated plan and the actual plan on SQL Server 2025, shows where the numbers split, and explains when to trust each one.
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 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.
Compare UTF-8 collations with NVARCHAR storage for English, European, and Asian text before converting indexes or clients.