Book description
Troubleshoot query performance issues, identify anti-patterns in code, and write efficient T-SQL queries
Key Features
- Discover T-SQL functionalities and services that help you interact with relational databases
- Understand the roles, tasks, and responsibilities of a T-SQL developer
- Explore solutions for carrying out database querying tasks, database administration, and troubleshooting
Book Description
Transact-SQL (T-SQL) is Microsoft's proprietary extension to the SQL language used with Microsoft SQL Server and Azure SQL Database. This book will be a usefu to learning the art of writing efficient T-SQL code in modern SQL Server versions as well as the Azure SQL Database.
The 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 leverage them for troubleshooting. In later chapters, you will explain how to identify various T-SQL patterns and anti-patterns. This will help you analyze execution plans to gain insights into current performance, and determine whether or not a query is scalable. You will also build diagnostic queries using dynamic management views (DMVs) and dynamic management functions (DMFs) to address various challenges in T-SQL execution. Next, you will work with the built-in tools of SQL Server to shorten the time taken to address query performance and scalability issues. In the concluding chapters, this 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 the book, you will have developed the skills to determine query performance bottlenecks, avoid pitfalls, and discover the anti-patterns in use.
What you will learn
- Use Query Store to understand and easily change query performance
- Recognize and eliminate bottlenecks that lead to slow performance
- Deploy quick fixes and long-term solutions to improve query performance
- Implement best practices to minimize performance risk using T-SQL
- Achieve optimal performance by ensuring careful query and index design
- Use the latest performance optimization features in SQL Server 2017 and SQL Server 2019
- Protect query performance during upgrades to newer versions of SQL Server
Who this book is for
This book is for database administrators, database developers, data analysts, data scientists, and T-SQL practitioners who want to get started with writing T-SQL code and troubleshooting query performance issues with the help of practical examples. Previous knowledge of T-SQL querying is not required to get started with this book.
Table of contents
- Title Page
- Copyright and Credits
- About Packt
- Foreword
- Contributors
- Preface
- Section 1: Query Processing Fundamentals
- Anatomy of a Query
- Understanding Query Processing
- Mechanics of the Query Optimizer
- Section 2: Dos and Donts of T-SQL
-
Exploring Query Execution Plans
- Accessing a query plan
- Navigating a query plan
- Query plan operators of interest
-
Query plan properties of interest
- Plan-level properties
- Operator-level properties
- Summary
- Writing Elegant T-SQL Queries
- Easily-Identified T-SQL Anti-Patterns
- Discovering T-SQL Anti-Patterns in Depth
- Section 3: Assemble Your Query Troubleshooting Toolbox
- Building Diagnostic Queries Using DMVs and DMFs
- Building XEvent Profiler Traces
- Comparative Analysis of Query Plans
- Tracking Performance History with Query Store
- Troubleshooting Live Queries
- Managing Optimizer Changes with the Query Tuning Assistant
- Other Books You May Enjoy
Product information
- Title: Learn T-SQL Querying
- Author(s):
- Release date: May 2019
- Publisher(s): Packt Publishing
- ISBN: 9781789348811
You might also like
book
T-SQL Querying
T-SQL insiders help you tackle your toughest queries and query-tuning problems Squeeze maximum performance and efficiency …
video
SQL Server 70-761: Querying Data with Transact-SQL
Nearly 13 Hours of Expert Video Instruction Overview This complete video course guides you hands-on through …
book
Beginning T-SQL: A Step-by-Step Approach
Get a performance-oriented introduction to the T-SQL language underlying the Microsoft SQL Server and Azure SQL …
book
SQL Server T-SQL Recipes, Fourth Edition
SQL Server T-SQL Recipes is an example-based guide to the Transact-SQL language that is at the …