O'Reilly logo

SQL Server MVP Deep Dives Vol. 2 by Kimberly Tripp, Paul Randal, Paul Nielsen, Brad McGehee, Greg Low, Louis Davidson, Kalen Delaney

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 35. You see sets, and I see loops

Linchi Shea

Within the SQL Server community, the predominant view on writing T-SQL for performance is that you should think in sets instead of procedures. In addition, it follows that you should focus on what result you want in terms of the set operations, and let SQL Server figure out how to get the result under the hood. This view has served the community well, especially when developers versed in indexed sequential access method (ISAM)-style databases, such as Microsoft Access, migrate to SQL Server and carry with them the habit of interacting with databases on a row-by-row basis. The set-oriented approach is an effective counter measure to minimize the potential damage to SQL Server performance ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required