Preemptive waits can measure work outside SQL Server cooperative scheduling. A customer asked about their increase during a health check.
SQL SERVER – DISTINCT Does Not Guarantee ORDER BY
DISTINCT removes duplicate result rows without guaranteeing their order. My original claim that it always sorts output was incorrect.
SQL SERVER – TOP and DISTINCT – Epic Confusion – SQL in Sixty Seconds #141
DBAs from the client’s organization ended up an argument about how T-SQL works. The discussion was about the epic confusion about TOP and DISTINCT.
How to Write Efficient Query? – Interview Question of the Week #300
Question: How to Write Efficient Query?
Answer: There is no right or wrong answer to this question. Let us learn about it today.
Rewriting Correlated Subqueries as Window Functions
Replace correlated subqueries with windowed counts, dates, and running totals, preserve detail rows, and keep useful EXISTS filters.
Performance Challenge – Write Efficient Query – SQL in Sixty Seconds #140
Recently while working with my client I ended up in a very interesting situation where my client wanted me to write an Efficient Query.







