© Lisa Bohm 2020
L. BohmRefactoring Legacy T-SQL for Improved Performancehttps://doi.org/10.1007/978-1-4842-5581-0_2

2. Documentation

Lisa Bohm1 
Chardon, OH, USA

Poorly performing code should be thoroughly documented before we undertake a rewrite. It is easy to start grabbing and rewriting code only to get bogged down in nested if statements, while loops, or calls to other SQL objects. If we have an understanding of the desired functionality, as well, we can make the determination whether the current code should be refactored or if we should just start from scratch.

Incorporating Existing Documentation

We can start with the code. If we don’t have any additional documentation, we’re going to need to figure out the functionality from the code itself. ...

Get Refactoring Legacy T-SQL for Improved Performance: Modern Practices for SQL Server Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.