Summary
In this chapter, we reviewed a few T-SQL anti-patterns, such as SELECT * syntax, OR logic, and functions in our predicates, that are relatively easy to find simply by looking at our T-SQL code and how it is written. The scenarios covered in this chapter are some of the most common examples of patterns that prevent our T-SQL queries from scaling well and maintaining the expected level of performance throughout the lifetime of the applications. All are easy to detect, and most have easy workarounds. Therefore, when writing queries, try to avoid these anti-patterns by leveraging some of the techniques we outlined here.
In the next chapter, we will investigate some T-SQL anti-patterns that are a bit more difficult to identify as they ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access