One of my repeat clients asked me if a query goes to parallel do they use all the threads. We can have parallelism and thread with no work.
The question is about JOIN Elimination for Not Selected Column. It was discussed in the Comprehensive Database Performance Health Check.
Why the result we get is the result we get. The answer is very simple – it is because of the Logical Processing Order of the SELECT Statement.
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.
Recently while working with my client I ended up in a very interesting situation where my client wanted me to write an Efficient Query.