Transact-SQL (T-SQL) is Microsoft's proprietary extension to the SQL language, which is used with Microsoft SQL Server and Azure SQL Database. This book is a useful guide to learning the art of writing efficient T-SQL code in modern SQL Server versions, as well as Azure SQL Database.
This book will get you started with query processing fundamentals to help you write powerful, performant T-SQL queries. You will then focus on query execution plans and understand how to leverage them for troubleshooting. In the later chapters, you will learn how to identify various T-SQL patterns and anti-patterns. This will help you analyze execution plans to gain insights into current performance, as well as to determine whether or not a query is scalable. You will also learn to build diagnostic queries using Dynamic Management Views (DMVs) and Dynamic Management Functions (DMFs) to address various challenges in T-SQL execution. Next, you will study how to leverage the built-in tools of SQL Server to shorten the time taken to address query performance and scalability issues. In the concluding chapters, the book will guide you through implementing various features such as Extended Events, Query Store, and Query Tuning Assistant using hands-on examples.
By the end of this book, you will have the skills to determine query performance bottlenecks, avoid pitfalls, and discover anti-patterns in use in your existing T-SQL code.