• The timing of this article was perfect for me.

    I'm in the process of evaluating some stored procedures that are poor performers (which is causing a host of other problems) and I had narrowed it down to some update queries that were architecturally identical to the 'death by SQL' example (intuitively, they just didn't look right). This article reinforces what I believed and shows me why.

    Like you say, it is data dependent, because in my test environment (small data set), I couldn't see any performance difference when comparing to the same queries rewritten with the 'target' table in the 'FROM' (which is how I would have done it if I had written it). The execution plans didn't reveal much, if any, difference. In Production, the dataset is huge and the queries involve transactions and linked servers, which are probably compounding the problem (from a stand point of execution time).

    Like I said, this is not my code, so I have to 'prove' to the owner that there is a better way to write the queries (a sensitive issue) so as to improve the performance, and now I have some reinforcement to do that.

    Once I get this code changed, I'll report back a before and after result (but don't hold your breath...it will take awhile where I work).

    Thanks Jeff!

    If it was easy, everybody would be doing it!;)