5
Writing Elegant T-SQL Queries
At this point, we should have a good understanding of how to build a T-SQL query, and the building blocks of writing T-SQL code such as query optimization fundamentals, reading and interpreting query plans, and some best practices around indexing and writing efficient T-SQL code. But how do we build an elegant T-SQL query? One that not only gets the job done but does so efficiently?
There are a few guidelines that are important to keep in mind when writing T-SQL queries to ensure that they perform and scale well while avoiding some common pitfalls that even experienced T-SQL developers can encounter that will make a query perform poorly.
In this chapter, we will examine some common T-SQL patterns and anti-patterns, ...
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