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 37. Strategies for unraveling tangled code

Jennifer McCown

When you inherit an application or a database, you often become the proud owner of overly complex, poorly performing T-SQL code. These queries rarely come equipped with meaningful documentation or with system architects who are willing and able to explain the code.

This chapter covers several methods to make sense of the mess. The overall approach is to organize, break down, and then streamline the code to identify and remove some of the nastier coding mistakes and inefficiencies.

The sample database is a small model of a vending machine business, called VendCo. Tables in the VendUnit schema store data about each vending machine (including model and location information) and ...

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